nano-cache
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -28,3 +28,3 @@ /*! | ||
compress: true, | ||
minFreeMem : os.totalmem() * .05, | ||
minFreeMem : 0, | ||
maxEvictBytes : os.totalmem() * .05 | ||
@@ -195,6 +195,6 @@ }; | ||
if (this.options.bytes) { | ||
if (this.options.maxBytes) { | ||
this._doEviction(function () { | ||
var stats = this.stats(); | ||
return stats.bytes > this.options.bytes; | ||
return stats.bytes > this.options.maxBytes; | ||
}.bind(this)); | ||
@@ -201,0 +201,0 @@ } |
{ | ||
"name": "nano-cache", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "simple node cache module", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -105,4 +105,4 @@ # nano-cache | ||
* `compress` - use compression to reduce in-memory cache size. Defaults to true, but can be disabled for improved speed at the cost of memory size. | ||
* `minFreeMem` - items will be evicted from cache if `os.freemem()` is lower. Defaults to 5% of total memory. | ||
* `maxEvictBytes` - maximum amount of memory to be evicted on check, which leaves time for garbage collection. | ||
* `minFreeMem` - items will be evicted from cache if `os.freemem()` is lower. Defaults to 0% of total memory. | ||
* `maxEvictBytes` - maximum amount of memory to be evicted on check, which leaves time for garbage collection, defaults to 5% of total memory. | ||
@@ -109,0 +109,0 @@ # License |
21974
5