cache
Object cache for nodejs.
Getting Started
npm install obj-cache
API
var cache_object=new cache(
{ name:'cache name', //optional keepalive:5601000, //optional,defalt 5 min loader:function(key,callback){}, dispose:function(value){} //optional });
cache_object.get(key,callback)
cache_object.try_get(key)
cache_object.exists(key)
cache_object.remove(key)
cache_object.clear()
cache_object.length
cache_object.dispose()
cache.cleanup()
cache.get_cache(name)
Sample
var cache=;var mycache= 'mycache' 1000*30 { database; } { conn; }; ... mycache; ... //exiting applicationcache; //release resource in all caches