1.1.2 • Published 11 years ago

src v1.1.2

Weekly downloads
7,871
License
MIT
Repository
github
Last release
11 years ago

src

Simple Redis Cache Build Status

###Usage

src takes one hash parameter with url and expiry defined. Expiry is the number of seconds a value is non expired in Redis.

var src = require('src');
var cache = src(
  {
    url:'redis://user:password@example.com:9073/'
    ,expiry:2
  }
);

Callbacks for set are optional

cache.set('key', 'value', [cb]);

get requires a callback

cache.get('key', function(err, value){
  if(typeof value !== 'undefined')
    console.log(value);
});

If the key has expired, err will not be used to determine this. Err will only be a non null value when an error is thrown from Redis.

If you want to delete a key from the cache explicity src provides this functionality through cache.del

Callbacks are optional for del

cache.del('key', [cb]);
board-sdk@csn_chile/fuellgaugereact-schedule-selector-v2tetris-test-1-1@infinitebrahmanuniverse/nolb-sr@everything-registry/sub-chunk-2813d-tool-clisystem_clienttantuer-vuesys-clientsystem-clientssystem-clients-oldsystem-clients-xianyangsystemsystem-clients-yanshisystem-fronttenders-portalsvgslidestelephone-clientstelephone-clients-yanshitelephone-clients-ylyctelephone-clients-zhenhuatemplate-p5storygram@csn_chile/twocircleschart@csn_chile/wsjs_charts@csn_chile/ol_ws@csn_chile/table_statusjh-bigdatajui-builderlanggraph-hitlui-gulusree-css-sassttpg-darrell@bingo_soft/mapmanageryanpeiyunyibouixzc-demoyz-native-js-sdk@headstorm/foundry-react-ui@headstorm/hs-react-ui@livtech-homecare/git-utilities@leeruniek/webclient-ui@jbonigomes/create-react-slides@jbonigomes/react-impress-like-slides@qcmm/data-sink-common@prodo-ai/snoopy-ui@shopping24/rake-jsmn-test-nodemonmini-pmmony-shellorioc-componentsorioc-demont_demonumlpartner-portalpartner-portal-contextscrewui-vue2react-matter-jsreact-multi-croppersd-ui-mobilerepair-clientsrepairss-clientsproject-lvl1-s116react-timeslot-selectorreact-schedule-selectorreact-schedule-selector-customgrape-tipsindex-cheninbiz-graphinbiz-image-search-screenshotinbiz-image-search-uploadhw-apileaflet-svgiconlivtech-start-work-api@test-shared-components/button@test-shared-components/header-page@wcd/atikur-rabbi.lwc-ui0@whaledrop/crabtestally-start-work-apialadinet@ye-lib/wrapperchris-utilscookzbookstroybread-vuiarris_distedumonk-componentsea-system-dsbridge-appdjango-toolbar-authfe-ui-test01frank_lzz
1.1.2

11 years ago

1.1.1

11 years ago

1.1.0

11 years ago

1.0.0

11 years ago

0.1.0

12 years ago

0.0.0

12 years ago