class Sprockets::Cache::FileStore
def get(key)
Experimental RBS support (using type sampling data from the type_fusion
project).
def get: (String key) -> (Array[Set] | nil | String)
This signature was generated using 47 samples from 3 applications.
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