No commit activity in last 3 years
No release in over 3 years
Dead simple tool for visual debugging of fragment cache.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
 Project Readme

Rails cache inspector

Dead simple tool for visual debugging of fragment cache.

Installation

Add this line to your application's Gemfile:

gem 'rails-cache-inspector', group: :development

Usage

Configure highlighting

# config/initializers/rails_cache_inspector.rb

RailsCacheInspector.configuration.highlight_with = { 
  style:      'filter: sepia(1)',  # default – 'filter: sepia(1)'
  class_name: 'is-cached'          # default - ''
}

Configure rails application

Make sure caching is turned on in development environment

# config/environments/development.rb

config.action_controller.perform_caching = true

In action

Cached fragments have blur filter in the demonstration below. It's easy to identify potentially slow parts of the page and make it fast again.

visual-debugging