DEV Community

Cover image for FastEntry - Rails cache management
Tiago Alves
Tiago Alves

Posted on

FastEntry - Rails cache management

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.

FastEntry interface

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

FastEntry dashboard
FastEntry inspect

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)

Collapse
 
mirzalazuardi profile image
Mirzalazuardi Hermawan • Edited

nice... i will use this for the next project . thanks Thiago

Collapse
 
alvesjtiago profile image
Tiago Alves

Thanks Alex 😊

Collapse
 
ben profile image
Ben Halpern

Ooh, definitely going to check this out!

Collapse
 
alvesjtiago profile image
Tiago Alves

Thank you Ben 🙏

Collapse
 
rhymes profile image
rhymes

Wow, this is amazing, thank you Tiago!

Collapse
 
alvesjtiago profile image
Tiago Alves

Thank you rhymes 🙏