1.0.1 • Published 9 years ago

express-redis-render-cache v1.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
9 years ago

The tests in this module flush Redis DB 15 to change the test DB use REDIS_DB=num to override


Usage

Requires Node V6

Cache Key generation

const supportedQuerystrings = {
    key: true, // Accepts all values
    complex: () => {} // Return a boolean
};

Basic

    const cache = expressRedisCache(supportedQuerystrings);

    app.use(cache);

Named

    const cache = expressRedisCache('blogPosts', supportedQuerystrings);

    app.use('/blog', cache); // OR
    app.use(cache);