cache-service-node-cache
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -7,3 +7,3 @@ var nodeCache = require('node-cache'); | ||
* @param config: { | ||
* type: {string | 'node-cache-standalone'} | ||
* type: {string | 'node-cache'} | ||
* verbose: {boolean | false}, | ||
@@ -123,3 +123,3 @@ * expiration: {integer | 900}, | ||
*/ | ||
self.flushAll = function(cb){ | ||
self.flush = function(cb){ | ||
log(false, 'Attempting to flush all data.'); | ||
@@ -126,0 +126,0 @@ try { |
{ | ||
"name": "cache-service-node-cache", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A node-cache plugin for cache-service.", | ||
@@ -5,0 +5,0 @@ "main": "nodeCacheModule.js", |
@@ -25,3 +25,3 @@ # cache-service-node-cache | ||
* It adds an excellent `.mset()` implementation which allow you to sset expirations on a per key, per function call, and/or per `cache-service-node-cache` instance basis (Vanilla node-cache does not offer `.mset()` at all). | ||
* It adds an excellent `.mset()` implementation which allow you to set expirations on a per key, per function call, and/or per `cache-service-node-cache` instance basis (Vanilla node-cache does not offer `.mset()` at all). | ||
* Built-in logging with a `verbose` flag. | ||
@@ -107,8 +107,6 @@ | ||
## .flushAll([cb]) | ||
## .flush([cb]) | ||
> When used with `cache-service`, use `cacheService.flush()`. | ||
Flush all keys and values from. | ||
Flush all keys and values from an instance of cache-service. | ||
* callback: type: function | ||
@@ -115,0 +113,0 @@ |
@@ -9,3 +9,3 @@ var expect = require('expect'); | ||
beforeEach(function(){ | ||
nodeCache.flushAll(); | ||
nodeCache.flush(); | ||
}); | ||
@@ -35,3 +35,3 @@ | ||
}); | ||
it('Setting several keys then calling .flushAll() should remove all keys', function (done) { | ||
it('Setting several keys then calling .flush() should remove all keys', function (done) { | ||
nodeCache.set(key, value); | ||
@@ -42,3 +42,3 @@ nodeCache.set('key2', 'value2'); | ||
expect(keyCount).toBe(3); | ||
nodeCache.flushAll(); | ||
nodeCache.flush(); | ||
var keyCount = nodeCache.db.getStats().keys; | ||
@@ -45,0 +45,0 @@ expect(keyCount).toBe(0); |
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
11943
120