Skip to content

Commit

Permalink
fixed expiry loading
Browse files Browse the repository at this point in the history
  • Loading branch information
wyattjoh committed Dec 20, 2017
1 parent b2cc4bd commit 2233d99
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion graph/loaders/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ class SharedCacheDataLoader extends DataLoader {
constructor(prefix, expiry, batchLoadFn, options) {
super(SharedCacheDataLoader.batchLoadFn(prefix, expiry, batchLoadFn), options);

// Expiry is provided as a number in ms, we're using commands optimized for
// seconds, so convert this to seconds.
this._expiry = Math.floor(expiry / 1000);
this._prefix = prefix;
this._expiry = expiry;
this._keyFunc = SharedCacheDataLoader.keyFunc(this._prefix);
}

Expand Down

0 comments on commit 2233d99

Please sign in to comment.