sprockets

https://github.com/rails/sprockets

Ruby

Rack-based asset packaging system

Sprockets::Cache#get

Public: Low level API to retrieve item directly from the backend cache
store.

This API may be used publicly, but may have undefined behavior
depending on the backend store being used. Prefer the
Cache#fetch API over using this.

key   - JSON serializable key
local - Check local cache first (default: false)

Returns a JSON serializable object or nil if there was a cache miss.

Source | Google | Stack overflow

Edit

git clone [email protected]:rails/sprockets.git

cd sprockets

open lib/sprockets/cache.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Sprockets--Cache-get-for-pr


# Commit to git

git add lib/sprockets/cache.rbgit commit -m "better docs for Sprockets::Cache#get"


# Open pull request

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

hub fork

git push <your name> -your-name--update-docs-Sprockets--Cache-get-for-pr

hub pull-request


# Celebrate!