@swarmy/lru-cache
Advanced tools
Comparing version 2.0.4 to 2.0.5
{ | ||
"name": "@swarmy/lru-cache", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"description": "LRU cache with event registry to handle cache changes", | ||
@@ -31,3 +31,3 @@ "author": "Gerd Neudert", | ||
"generate-doc": "./node_modules/.bin/jsdoc -a all -d docs ./src/LruCache.js", | ||
"prep-publish": "rm -rf docs && rm -rf coverage && npm run build && npm run test && npm run test-performance && npm run remove-absolute-pathes-from-reports && npm run generate-doc" | ||
"prep-publish": "rm -rf docs && rm -rf coverage && npm run build && npm run test && npm run test-performance && npm run remove-absolute-pathes-from-reports && npm run generate-doc && echo \"!!!DO NOT FORGET TO UPDATE commit in README afterwards!!!\"" | ||
}, | ||
@@ -34,0 +34,0 @@ "devDependencies": { |
@@ -44,3 +44,3 @@ # lru-cache | ||
* [Detailed Usage](#caching-detail) | ||
* [JSDoc](https://rawcdn.githack.com/gneu77/lru-cache/a58e345708cb07d4f24434eba9ea4760d61a264b/docs/index.html) | ||
* [JSDoc](https://rawcdn.githack.com/gneu77/lru-cache/a03482ca34b4dd7decf6d6057e56c8a8cee7fb6e/docs/index.html) | ||
@@ -58,8 +58,8 @@ ### Cache Events | ||
* [Detailed Usage](#cache-events-detail) | ||
* [JSDoc](https://rawcdn.githack.com/gneu77/lru-cache/a58e345708cb07d4f24434eba9ea4760d61a264b/docs/index.html) | ||
* [JSDoc](https://rawcdn.githack.com/gneu77/lru-cache/a03482ca34b4dd7decf6d6057e56c8a8cee7fb6e/docs/index.html) | ||
## Quality | ||
* [Test results](https://rawcdn.githack.com/gneu77/lru-cache/a58e345708cb07d4f24434eba9ea4760d61a264b/test-report.html) | ||
* [Test coverage](https://rawcdn.githack.com/gneu77/lru-cache/a58e345708cb07d4f24434eba9ea4760d61a264b/coverage/index.html) | ||
* [Performance tests](https://rawcdn.githack.com/gneu77/lru-cache/a58e345708cb07d4f24434eba9ea4760d61a264b/performance-report.html) | ||
* [Test results](https://rawcdn.githack.com/gneu77/lru-cache/a03482ca34b4dd7decf6d6057e56c8a8cee7fb6e/test-report.html) | ||
* [Test coverage](https://rawcdn.githack.com/gneu77/lru-cache/a03482ca34b4dd7decf6d6057e56c8a8cee7fb6e/coverage/index.html) | ||
* [Performance tests](https://rawcdn.githack.com/gneu77/lru-cache/a03482ca34b4dd7decf6d6057e56c8a8cee7fb6e/performance-report.html) | ||
@@ -88,6 +88,6 @@ ## Develop | ||
* Compared to a native Javascript Map, the LRU logic implies performance impact on get, set and delete. It's just the price to pay for having a LRU cache. | ||
* See [Performance tests](https://rawcdn.githack.com/gneu77/lru-cache/a58e345708cb07d4f24434eba9ea4760d61a264b/performance-report.html) | ||
* See [Performance tests](https://rawcdn.githack.com/gneu77/lru-cache/a03482ca34b4dd7decf6d6057e56c8a8cee7fb6e/performance-report.html) | ||
* However, the methods are still O(1). (Only setMaxSize has O(size-newMaxSize), if size>newMaxSize) | ||
* Compared to a LRU cache without cache events, the is additional performance impact on get, set and delete. | ||
* Again see [Performance tests](https://rawcdn.githack.com/gneu77/lru-cache/a58e345708cb07d4f24434eba9ea4760d61a264b/performance-report.html) | ||
* Again see [Performance tests](https://rawcdn.githack.com/gneu77/lru-cache/a03482ca34b4dd7decf6d6057e56c8a8cee7fb6e/performance-report.html) | ||
* However, if you are caching for performance, then because the fetching of values is significantly more time consuming. So whether you save 400ms or only 399ms hardly makes a difference here. | ||
@@ -94,0 +94,0 @@ * If you are not caching for performance reasons, but to have the change events, well than again it's just the price to pay for the event handling. |
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
118659