method
retrieve_cache_key
v5.2.3 -
Show latest stable
- Class:
ActiveSupport::Cache
retrieve_cache_key(key)private
No documentation available.
# File activesupport/lib/active_support/cache.rb, line 92
def retrieve_cache_key(key)
case
when key.respond_to?(:cache_key_with_version) then key.cache_key_with_version
when key.respond_to?(:cache_key) then key.cache_key
when key.is_a?(Array) then key.map { |element| retrieve_cache_key(element) }.to_param
when key.respond_to?(:to_a) then retrieve_cache_key(key.to_a)
else key.to_param
end.to_s
end