{"repo":"koajs/koa-redis","free":true,"listed":false,"github":"https://github.com/koajs/koa-redis","clone":"git clone https://github.com/koajs/koa-redis.git","description":"Redis storage for Koa session middleware/cache with Sentinel and Cluster support","language":"JavaScript","stars":353,"topics":["redis","koa","node","sentinel","cluster","cache","session","storage"],"license":"MIT","category":"databases-storage","readme_excerpt":"koa-redis [![build status][travis-image]][travis-url] [![Coveralls][coveralls-image]][coveralls-url] [![David deps][david-image]][david-url] [![David devDeps][david-dev-image]][david-dev-url] [![license][license-image]][license-url] Redis storage for Koa session middleware/cache with Sentinel and Cluster support v4.0.0+ now uses ioredis and has support for Sentinel and Cluster! Table of Contents Install Usage Basic Sentinel Cluster Options Events API module(options) session.get(sid) session.set(sid, sess, ttl) session.destroy(sid) session.quit() session.end() session.status session.connected session.client Benchmark Testing License Contributors Install [npm][]: [yarn][]: Usage koa-redis works with koa-generic-session (a generic session middleware for koa). For more examples, please see the examples folder of koa-generic-session . Basic Sentinel Cluster Options all ioredis options - Useful things include url , host , port , and path to the server. Defaults to 127.0.0.1:6379 db (number) - will run client.select(db) after connection client (object) - supply your own client, all other options are ignored unless duplicate is also supplied duplicate (boolean) - When true, it will run client.duplicate() on the supplied client and use all other options supplied. This is useful if you want to select a different DB for sessions but also want to base from the same client object. serialize - Used to serialize the data that is saved into the store. unserialize - Used to unserialize the da","default_branch":null,"files":null,"tree":[],"storefront":"/r/koajs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/koajs/koa-redis/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}