REDIS-WRAPPER
Because I wrote this too many times already, I decided to just move it into a small module of its own.
SETUP CLASS
Javascript:
{ }MyRedisClassprototype = 'redis-wrapper' // or mix into a singleton object with underscoreMySingleton = { } ;MySingleton = _;
Coffeescript:
'redis-wrapper'
USAGE
Setup your classes with use()
MyClassprototype = 'redis-wrapper'; var instance = client = ; instance;
Adds ensureClient()
before redis-related methods to ensure a client is set.
MyClassprototype { this; // do things with this.client};
That's all.
TODO
- Adds ability to use a url (via
redis-url
) or host/port combination.
LICENSE
BSD