nowfound

Life & fun · March 3, 2012

Stash, a graph-based cache for Node.js and Redis

Last night, while trying to figure out the best way to implement caching in my app, I had an idea for a dirt-simple caching system based on a dependency graph. The premise I started with is that one of the hardest things to manage in a cache is dependencies between entities. In order to cache items effectively, you inevitably have to duplicate "child" data inside of "parent" entries. Then, when a child is changed, you have to invalidate the child and its parents, and its parents' parents, and so on. To try to help this, I hacked together a simple Node.js library called Stash, which models…

Stash, a graph-based cache for Node.js and Redis launched on March 3, 2012 with 56 votes, #27 of 340 launches that month and more than 90% of that year's launches. The site was still online in September 2026, 14 years on.

Visit github.com ↗Alternativestop 8% of March 2012

In plain words

Stash is a caching library for Node.js that uses Redis and models cached data as a dependency graph. It solves the problem of cache invalidation by automatically tracking relationships between cached items—when one item changes, Stash walks the graph to invalidate all dependent items without manual management. This eliminates the need to manually track and invalidate parent and child entries separately, simplifying cache management in applications with complex data dependencies.

written from the facts on this page · September 2026

From the sources

A graph-based cache for Node.js, powered by Redis. Contribute to nkohari/stash development by creating an account on GitHub.

In the maker’s words, at launch

Last night, while trying to figure out the best way to implement caching in my app, I had an idea for a dirt-simple caching system based on a dependency graph. The premise I started with is that one of the hardest things to manage in a cache is dependencies between entities. In order to cache items effectively, you…

Does a similar job

all alternatives →

More life & fun this month

the category →

Source: Show HN post ↗ · launch text quoted in part

Launched alongside, March 2012

the whole month →