We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
expiresIn
1 parent c9d4bca commit 3665f83Copy full SHA for 3665f83
lib/connect-dynamodb.js
@@ -68,7 +68,10 @@ module.exports = function (connect) {
68
if (this.reapInterval > 0) {
69
this._reap = setInterval(this.reap.bind(this), this.reapInterval);
70
}
71
- this.expiresIn = null == options.expiresIn ? 0 : options.expiresIn
+ this.expiresIn = null == options.expiresIn ? 0 : Math.max(options.expiresIn, 0)
72
+ if (options.expiresIn && options.expiresIn < 0) {
73
+ console.warn("Negative `expiresIn` values are not supported. Reverting to default behaviour")
74
+ }
75
76
77
/*
0 commit comments