diff --git a/graph/loaders/util.js b/graph/loaders/util.js index fe2a4e3d0..4d43d1811 100644 --- a/graph/loaders/util.js +++ b/graph/loaders/util.js @@ -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); }