Sha256: b5109588e5312ed584ee3dc79210f11e7a1cf06b35e571c2a6f4964f91c787b6
Contents?: true
Size: 636 Bytes
Versions: 87
Compression:
Stored size: 636 Bytes
Contents
module Scrivito module Cache class RamStore include Chainable attr_reader :internal_store, :next_store, :cache_prefix def initialize(options = {}) @internal_store = {} @next_store, @cache_prefix = *options.values_at(:next_store, :cache_prefix) end delegate :clear, to: :internal_store private def tentative? true end def internal_read(key) internal_store[key] end def internal_write(key, value, expires_in = nil) internal_store[key] = value end def transform_key(key) cache_prefix ? "#{cache_prefix}/#{key}" : key end end end end
Version data entries
87 entries across 87 versions & 1 rubygems