Comparing version 0.2.1 to 0.2.2
@@ -5,2 +5,3 @@ module.exports = function Cache(options) { | ||
var self = this, | ||
maxDurationSeconds = parseInt('0x7FFFFFFF', 16) / 1000, // setTimeout uses a 32bit integer to store its delay value, so anything above that (24.8551 days) will cause the timeout to execute immediately | ||
clone = require('clone'), | ||
@@ -81,3 +82,3 @@ hits = 0, | ||
durationSeconds = (durationSeconds) ? Math.max(1, durationSeconds) : 1; | ||
durationSeconds = (durationSeconds) ? Math.max(0, Math.min(maxDurationSeconds, durationSeconds)) : 1; // must be between 0 and 2147483.647 seconds | ||
@@ -84,0 +85,0 @@ if (Object.keys(cachedItems).length >= self.maxSize && |
@@ -7,3 +7,3 @@ { | ||
], | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"dependencies": { | ||
@@ -10,0 +10,0 @@ "clone": "0.1.x" |
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
18583
362