New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

memorystore

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

memorystore - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

12

lib/memorystore.js

@@ -28,2 +28,8 @@ /*!

function prune (store) {
store.forEach(function (value, key) {
store.get(key)
})
}
var defer = typeof setImmediate === 'function'

@@ -65,6 +71,8 @@ ? setImmediate

this.options = options || {}
this.options = {}
this.options.checkPeriod = options.checkPeriod || oneDay
this.options.max = options.max || Infinity
this.options.ttl = options.ttl
this.options.dispose = options.dispose
this.options.stale = options.stale

@@ -76,3 +84,3 @@ this.store = LRU(this.options)

debug('Pruning old entries')
self.store.prune() // iterates over the entire cache proactively pruning old entries
prune(self.store) // iterates over the entire cache proactively pruning old entries
}, this.options.checkPeriod)

@@ -79,0 +87,0 @@ }

8

package.json
{
"name": "memorystore",
"version": "1.2.3",
"version": "1.2.4",
"description": "express-session full featured MemoryStore layer without leaks!",

@@ -30,7 +30,7 @@ "main": "index.js",

"debug": "2.6.8",
"lru-cache": "~4.1.1"
"lru-cache": "~2.7.3"
},
"devDependencies": {
"mocha": "^3.4.2",
"standard": "^10.0.2"
"mocha": "3.4.2",
"standard": "10.0.2"
},

@@ -37,0 +37,0 @@ "standard": {

@@ -46,6 +46,2 @@ # memorystore [![NPM Version](https://img.shields.io/npm/v/memorystore.svg)](https://www.npmjs.com/package/memorystore) [![Build Status](https://travis-ci.org/roccomuso/memorystore.svg?branch=master)](https://travis-ci.org/roccomuso/memorystore) [![Dependency Status](https://david-dm.org/roccomuso/memorystore.png)](https://david-dm.org/roccomuso/memorystore) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

get a stale entry, as if it had already been deleted.
* `noDisposeOnSet` By default, if you set a `dispose()` method, then
it'll be called whenever a `set()` operation overwrites an existing
key. If you set this option, `dispose()` will only be called when a
key falls out of the cache, not when it is overwritten.

@@ -52,0 +48,0 @@ ## Debug

@@ -25,4 +25,3 @@ var assert = require('assert')

dispose: null,
stale: true,
noDisposeOnSet: true
stale: true
})

@@ -34,3 +33,2 @@ assert.equal(store.options.max, 10, 'should set the max option')

assert.equal(store.options.stale, true, 'should set stale')
assert.equal(store.options.noDisposeOnSet, true, 'should set noDisposeOnSet')
done()

@@ -37,0 +35,0 @@ })

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc