class Sprockets::Cache::FileStore
def get(key)
key - String cache key.
This API should not be used directly, but via the Cache wrapper API.
Public: Retrieve value from cache.
def get(key) path = File.join(@root, "#{key}.cache") value = safe_open(path) do |f| begin EncodingUtils.unmarshaled_deflated(f.read, Zlib::MAX_WBITS) rescue Exception => e @logger.error do "#{self.class}[#{path}] could not be unmarshaled: " + "#{e.class}: #{e.message}" end nil end end if value FileUtils.touch(path) value end end