Skip to content
Myr

Both Cache and Session option "reapInterval" may be "reapEvery". Closes #174

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent 5ce1306 · Browse files · 2 files+8 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+8 added−8 removed

  • other:+8 added−8 removed

2 files+8 added−8 removed

modified:lib/express/plugins/cache.js+4 added-4 removed
183 unmodified lines
184 * Initialize memory store and start reaper.185 *186 * Options:187 *188 * - dataStore constructor name of cache data store, defaults to Store.Memory189 * - lifetime lifetime of cache in milliseconds, defaults to one day190 * - reapInterval interval in milliseconds in which to reap old caches, defaults to one hour188 * - dataStore constructor name of cache data store, defaults to Store.Memory189 * - lifetime lifetime of cache in milliseconds, defaults to one day190 * - reapInterval, reapEvery interval in milliseconds in which to reap old caches, defaults to one hour191 * 192 * @param {hash} options193 * @api private194 */
16 unmodified lines
211 oneDay = 86400000,212 oneHour = 3600000213 setInterval(function(){214 self.store.reap(self.lifetime || oneDay)215 }, self.reapInterval || oneHour)215 }, self.reapInterval || self.reapEvery || oneHour)216 }217 }218})
modified:lib/express/plugins/session.js+4 added-4 removed
146 unmodified lines
147 * Initialize memory store and start reaper.148 *149 * Options:150 *151 * - dataStore constructor name of session data store, defaults to Store.Memory152 * - lifetime lifetime of session in milliseconds, defaults to one day153 * - reapInterval interval in milliseconds in which to reap old sessions, defaults to one hour151 * - dataStore   constructor name of session data store, defaults to Store.Memory152 * - lifetime lifetime of session in milliseconds, defaults to one day153 * - reapInterval, reapEvery interval in milliseconds in which to reap old sessions, defaults to one hour154 * 155 * @param {hash} options156 * @api private157 */
15 unmodified lines
173 oneDay = 86400000,174 oneHour = 3600000175 setInterval(function(){176 self.store.reap(self.lifetime || oneDay)177 }, self.reapInterval || oneHour)177 }, self.reapInterval || self.reapEvery || oneHour)178 }179 },180 181 // --- Events
24 unmodified lines