Flowdock
method

expand_cache_key

Importance_1
Ruby on Rails latest stable (v4.0.2) - 0 notes - Class: ActiveSupport::Cache
expand_cache_key(key, namespace = nil) public

Expands out the key argument into a key that can be used for the cache store. Optionally accepts a namespace, and all keys will be scoped within that namespace.

If the key argument provided is an array, or responds to to_a, then each of elements in the array will be turned into parameters/keys and concatenated into a single key. For example:

expand_cache_key([:foo, :bar])               # => "foo/bar"
expand_cache_key([:foo, :bar], "namespace")  # => "namespace/foo/bar"

The key argument can also respond to cache_key or to_param.

Show source
Register or log in to add new notes.