Attempting forceFetchUser callback

This commit is contained in:
abalabahaha
2016-02-20 18:33:36 -08:00
parent 78b18de1e1
commit 47ecc934f1
8 changed files with 244 additions and 171 deletions

View File

@@ -18,6 +18,7 @@ var Cache = (function (_Array) {
_Array.call(this);
this[discrimS] = discrim || "id";
this[discrimCacheS] = {};
this.limit = limit;
}
Cache.prototype.get = function get(key, value) {
@@ -101,7 +102,7 @@ var Cache = (function (_Array) {
};
Cache.prototype.add = function add(data) {
var cacheKey = this[discrimS] === "id" ? data.id : data[this[discrimS]];
var cacheKey = data[this[discrimS]];
if (this[discrimCacheS][cacheKey]) {
return this[discrimCacheS][cacheKey];
}