@type-cacheable/lru-cache-adapter
Advanced tools
Comparing version 10.0.3 to 11.0.0
@@ -32,3 +32,5 @@ "use strict"; | ||
// the lru-cache takes ttl in ms instead of seconds, so convert seconds to ms | ||
return Promise.resolve(this.lruClient.set(cacheKey, value, ttl ? ttl * 1000 : undefined)); | ||
return Promise.resolve(this.lruClient.set(cacheKey, value, ttl ? { | ||
ttl: ttl * 1000, | ||
} : undefined)); | ||
}); | ||
@@ -38,3 +40,3 @@ } | ||
try { | ||
return this.lruClient.maxAge / 1000; | ||
return this.lruClient.ttl / 1000; | ||
} | ||
@@ -49,7 +51,7 @@ catch (_a) { | ||
keyOrKeys.forEach((key) => { | ||
this.lruClient.del(key); | ||
this.lruClient.delete(key); | ||
}); | ||
return keyOrKeys.length; | ||
} | ||
this.lruClient.del(keyOrKeys); | ||
this.lruClient.delete(keyOrKeys); | ||
return 1; | ||
@@ -56,0 +58,0 @@ }); |
{ | ||
"name": "@type-cacheable/lru-cache-adapter", | ||
"version": "10.0.3", | ||
"version": "11.0.0", | ||
"description": "Adapter for using lru-cache with type-cacheable", | ||
@@ -40,4 +40,4 @@ "main": "dist/index.js", | ||
"@types/jest": "^27.0.0", | ||
"@types/lru-cache": "^5.1.1", | ||
"lru-cache": "^6.0.0", | ||
"@types/lru-cache": "^7.4.0", | ||
"lru-cache": "^7.3.0", | ||
"typescript": "^4.4.3" | ||
@@ -47,5 +47,5 @@ }, | ||
"@type-cacheable/core": "^10.0.0", | ||
"lru-cache": "^6.0.0" | ||
"lru-cache": "^7.3.0" | ||
}, | ||
"gitHead": "056c0e2ef5d5e4ae1bf043e70402a04484412d21" | ||
"gitHead": "60ee34c648544f7e5df34b689a4ad4b26d170c76" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10000
105