ncache-professional-sessions

5.3.0 • Public • Published

ncache-professional-sessions

ncache-professional-sessions provides NCache session storage for Express.

Installation

NCache

NCache Node.js client requires a working NCache cluster to run. This cluster handles the storage and manipulation of the user data.

ncache-session package

npm install ncache-professional-sessions

Overview

Usage

const session = require('express-session');

const ncacheStore = require('ncache-professional-sessions')(session);
const store = await ncacheStore.createStore(config);

app.use(
    session({
            secret: 'keyboard cat',
            resave: false,
            saveUninitialized: true,
            store: store
    })
);

config

{ "ttl" : 3600, "cacheName" : "demoCache", "disableTouch" : false }

cacheName

cacheName is the name of your cache being used. must be provided

ttl

time-to-live, means the total time for which session would remain in the NCache store. default is 86400 sec if not provided

disableTouch

disableTouch by default is false, which means that the session is being refreshed every time you try to access it.

License

Alachisoft License.

Copyright

Copyright (c) 2022, Alachisoft, All Rights Reserved.

Visit https://www.alachisoft.com/ for more information.

Readme

Keywords

none

Package Sidebar

Install

npm i ncache-professional-sessions

Weekly Downloads

0

Version

5.3.0

License

Alachisoft

Unpacked Size

31.9 kB

Total Files

6

Last publish

Collaborators

  • ncachedev