cache-manager 4.0.1 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/History.md CHANGED
@@ -1,3 +1,6 @@
1
+ - 4.1.0
2
+ - Support for TTL as third arg in memory store set function (#196). - @ZirionNeft
3
+
1
4
  - 4.0.1
2
5
  - Fix TTL option bug for memory cache (#194). - @anchan828
3
6
 
@@ -64,6 +64,10 @@ var memoryStore = function(args) {
64
64
  }
65
65
  options = options || {};
66
66
 
67
+ if (options && typeof options === 'number') {
68
+ options = {ttl: options};
69
+ }
70
+
67
71
  var ttl = (options.ttl || options.ttl === 0) ? options.ttl * 1000 : lruOpts.ttl;
68
72
 
69
73
  lruCache.set(key, value, {ttl});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cache-manager",
3
- "version": "4.0.1",
3
+ "version": "4.1.0",
4
4
  "description": "Cache module for Node.js",
5
5
  "main": "index.js",
6
6
  "files": [