class Sprockets::Cache
def get(key, local = false)
local - Check local cache first (default: false)
key - JSON serializable key
Cache#fetch API over using this.
depending on the backend store being used. Prefer the
This API may be used publicly, but may have undefined behavior
store.
Public: Low level API to retrieve item directly from the backend cache
def get(key, local = false) expanded_key = expand_key(key) if local && value = @fetch_cache.get(expanded_key) return value end value = @cache_wrapper.get(expanded_key) @fetch_cache.set(expanded_key, value) if local value end