holder
A simple caching utility for Node.js
Install
$ npm install holder
Usage
var holder = ; var cache = ; cache;cache; // "bar"cache;
Cache Types
There are 3 built-in cache types: NullCache
, MemoryCache
, and FileCache
. The first one, NullCache
, is a fake cache that doesn't actually cache anything, useful for testing purposes. MemoryCache
simply stores your data in Node.js memory. FileCache
store your stuff in files on the disk, useful when you don't want use up your memory or if you don't want to lose your cache if your application dies.
Extending
There is also a base class Cache
that has the interface for a cache class. By inheriting from this class you can create your cache types.
holder { holderCache;}; holderRedisCacheprototype = ; holderRedisCacheprototype { // ...}; holderRedisCacheprototype { // ...}; holderRedisCacheprototype { // ...}