Method: AbstractController::Caching::Fragments#combined_fragment_cache_key
- Defined in:
- lib/abstract_controller/caching/fragments.rb
#combined_fragment_cache_key(key) ⇒ Object
68 69 70 71 72 73 74 75 76 |
# File 'lib/abstract_controller/caching/fragments.rb', line 68 def combined_fragment_cache_key(key) head = self.class.fragment_cache_keys.map { |k| instance_exec(&k) } tail = key.is_a?(Hash) ? url_for(key).split("://").last : key cache_key = [:views, ENV["RAILS_CACHE_ID"] || ENV["RAILS_APP_VERSION"], head, tail] cache_key.flatten!(1) cache_key.compact! cache_key end |