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.
⚡️
Top comments (6)
nice... i will use this for the next project . thanks Thiago
Thanks Alex 😊
Ooh, definitely going to check this out!
Thank you Ben 🙏
Wow, this is amazing, thank you Tiago!
Thank you rhymes 🙏