@digitalbazaar/lru-memoize
Advanced tools
Comparing version 2.0.0 to 2.1.0
# @digitalbazaar/lru-memoize ChangeLog | ||
## 2.1.0 - 2021-06-30 | ||
### Added | ||
- Add dispose on settle feature. | ||
## 2.0.0 - 2021-03-02 | ||
@@ -4,0 +9,0 @@ |
@@ -19,2 +19,5 @@ /*! | ||
* retrieved from cache, thereby extending the expiration date of the entry. | ||
* @param {boolean} [cacheOptions.disposeOnSettle=false] - When set to true | ||
* entries will be removed from cache once they've settled. This is to only | ||
* be used when one needs a promise queue. | ||
* | ||
@@ -25,2 +28,3 @@ * @returns {LruCache} The class. | ||
constructor(cacheOptions) { | ||
this.options = cacheOptions || {}; | ||
this.cache = new LRU(cacheOptions); | ||
@@ -69,4 +73,8 @@ } | ||
if(this.options.disposeOnSettle) { | ||
this.cache.del(key); | ||
} | ||
return result; | ||
} | ||
} |
{ | ||
"name": "@digitalbazaar/lru-memoize", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "LRU Memoize", | ||
@@ -5,0 +5,0 @@ "license": "BSD-3-Clause", |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
6233
81
1