Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

connect-redis

Package Overview
Dependencies
Maintainers
3
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-redis - npm Package Compare versions

Comparing version 5.0.0 to 5.1.0

.github/release-drafter.yml

6

lib/connect-redis.js

@@ -26,2 +26,3 @@ /*!

this.ttl = options.ttl || 86400 // One day in seconds.
this.disableTTL = options.disableTTL || false
this.disableTouch = options.disableTouch || false

@@ -57,3 +58,3 @@ }

args.push(value)
args.push('EX', this._getTTL(sess))
if (!this.disableTTL) args.push('EX', this._getTTL(sess))

@@ -64,4 +65,3 @@ this.client.set(args, cb)

touch(sid, sess, cb = noop) {
if (this.disableTouch) return cb()
if (this.disableTouch || this.disableTTL) return cb()
let key = this.prefix + sid

@@ -68,0 +68,0 @@ this.client.expire(key, this._getTTL(sess), (err, ret) => {

{
"name": "connect-redis",
"description": "Redis session store for Connect",
"version": "5.0.0",
"version": "5.1.0",
"author": "TJ Holowaychuk <tj@vision-media.ca>",

@@ -18,4 +18,3 @@ "contributors": [

"eslint": "^7.4.0",
"eslint-config-prettier": "^6.1.0",
"eslint-plugin-prettier": "^3.1.0",
"eslint-config-prettier": "^7.2.0",
"express-session": "^1.17.0",

@@ -26,3 +25,3 @@ "ioredis": "^4.17.1",

"redis": "^3.0.2",
"redis-mock": "^0.49.0"
"redis-mock": "^0.56.3"
},

@@ -38,4 +37,5 @@ "engines": {

"lint": "eslint index.js test lib",
"fmt": "prettier --write \"**/*.{js,md,json,*rc}\""
"fmt": "prettier --write \"**/*.{js,md,json,*rc}\"",
"fmt-check": "prettier --check \"**/*.{js,md,json,*rc}\""
}
}

@@ -81,2 +81,8 @@ ![Build Status](https://github.com/tj/connect-redis/workflows/build/badge.svg?branch=master) [![npm](https://img.shields.io/npm/v/connect-redis.svg)](https://npmjs.com/package/connect-redis) [![code-style](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://gitter.im/jlongster/prettier) ![Downloads](https://img.shields.io/npm/dm/connect-redis.svg)

##### disableTTL
Disables key expiration completely (default: `false`)
This option disables key expiration requiring the user to manually manage key cleanup outside of `connect-redis`. Only use if you know what you are doing and have an exceptional case where you need to manage your own expiration in Redis. Note this has no effect on `express-session` setting cookie expiration.
##### serializer

@@ -120,1 +126,3 @@

If you want to retry, here is [another option](https://github.com/expressjs/session/issues/99#issuecomment-63853989).
[1]: https://github.com/NodeRedis/node-redis

@@ -32,2 +32,3 @@ const test = require('blue-tape')

t.equal(store.disableTouch, false, 'defaults to having `touch` enabled')
t.equal(store.disableTTL, false, 'defaults to having `ttl` enabled')
client.end(false)

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

Sorry, the diff of this file is not supported yet

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