Multi Level Cache

10 views
Skip to first unread message

Guy Ellis

unread,
Apr 15, 2015, 10:15:42 PM4/15/15
to phoenixj...@googlegroups.com
Hey guys,

I just published https://github.com/guyellis/multi-level-cache to Npmjs.

This is something that a number of my Node.js clients have needed but I couldn't find anything out there that already does this. (If you know of something please let me know.)

I'm wondering if the team is interested in working on this to expand your JavaScript knowledge?

The basic idea is that you can use this module for caching. It allows you to declare a local and a remote cache. You can create as many caches as you need/want. For each cache object you create you can specify if the key/value that you're caching is cached locally (only) or remotely (only) or in both locations as well as a time-to-live (TTL).

This module doesn't actually do any caching. It relies on other established caching modules to do that. So far it has 1 local cache implemented (node-cache) and 1 remote cache (redis). It acts as a front for those modules and manages the data in the 2 cache locations. This is the sort of module that enterprises often need when they're trying to boost performance and fine tune their clusters.

If anyone is interested in adding another module (e.g. memcached or lru-cache) then it's a fairly easy pattern to follow.

Let me know what you think.

Guy
Reply all
Reply to author
Forward
0 new messages