1.0.1 • Published 11 years ago

scache v1.0.1

Weekly downloads
10
License
-
Repository
github
Last release
11 years ago

scache

Simple in-memory cache for node.js

Installation

npm install scache

Usage

var cache = require('scache');

cache.set('key', 5, 1000*60);
console.log(cache.get('key'));

cache.del('key');
console.log(cache.exists('key'));

API

cache.set(key, value, duration);

Cache value, optional with specified lifetime.

cache.get(key)

Retrieve value by key

cache.del(key)

Remove value

cache.clear()

Remove all values