Bring cache_digests to the action_caching
Snippet to use the cache_digest for the action caching. As soon as the index.html.erb is updated or any partials inside the file is updated, it will expire the cache.
caches_action :index, :cache_path => proc { |c|
  { 
    digest: CacheDigests::TemplateDigestor.digest('home/index', 'html.erb', c.lookup_context)
  }
}Written by Gregory
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
 #Rails 
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#

 
 
 
 
