Tiago Alves
Posted on March 25, 2019
There are only two hard things in Computer Science: cache invalidation and naming things.
-- Phil Karlton
I've recently been working on a Rails project that uses a lot of cached resources: keys, views, json and many more.
As this information is scattered throughout the codebase using Rails.cache
, it was becoming increasingly difficult to understand what was being cached, which keys were being used and how to quickly manage this information.
Inspired by Sidekiq's web interface I've been building an open-source gem called FastEntry to easily manage cached information both in development and production.
Here is a list of the current features:
- List all cached entries (paginated)
- Inspect a single entry with formatted content
- Search for a specific entry via its key
- Invalidate one or multiple keys at a time
- Stats on number of entries set
In the future I'm planning to add:
- Cache groups
- Edit invalidation time
- API's to access cache information
- More stats (eg. number of entries expiring today, memory usage, etc)
FastEntry is open-source and available at https://github.com/alvesjtiago/fastentry.
If you're building a Rails application and want to easily manage cache give it a try and let me know what you think at @alvesjtiago or directly through the project's repository issues.
⚡️
Posted on March 25, 2019
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.