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

@@ -8,6 +8,7 @@ export default class Cache extends Array {
super();
this[discrimS] = discrim || "id";
this[discrimCacheS] = {};
this.limit = limit;
}
get(key, value) {
@@ -65,7 +66,7 @@ export default class Cache extends Array {
}
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];
}