sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

ActiveSupport::Cache.expand_cache_key

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+.

Source | Google | Stack overflow

Edit

git clone [email protected]:sonic-pi-net/sonic-pi.git

cd sonic-pi

open app/server/ruby/vendor/activesupport-7.0.6/lib/active_support/cache.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-ActiveSupport--Cache-expand_cache_key-for-pr


# Commit to git

git add app/server/ruby/vendor/activesupport-7.0.6/lib/active_support/cache.rbgit commit -m "better docs for ActiveSupport::Cache.expand_cache_key"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-ActiveSupport--Cache-expand_cache_key-for-pr

hub pull-request


# Celebrate!