Method: ActionView::Helpers::CacheHelper#cache_fragment_name

Defined in:
actionview/lib/action_view/helpers/cache_helper.rb

#cache_fragment_name(name = {}, skip_digest: nil, digest_path: nil) ⇒ Object

This helper returns the name of a cache key for a given fragment cache call. By supplying skip_digest: true to cache, the digestion of cache fragments can be manually bypassed. This is useful when cache fragments cannot be manually expired unless you know the exact key which is the case when using memcached.



248
249
250
251
252
253
254
# File 'actionview/lib/action_view/helpers/cache_helper.rb', line 248

def cache_fragment_name(name = {}, skip_digest: nil, digest_path: nil)
  if skip_digest
    name
  else
    fragment_name_with_digest(name, digest_path)
  end
end