Sha256: 6ef8da39c205de5ede62b8db1eb07cfd9d0f13a53c2d4b88fe5445097cadafe4
Contents?: true
Size: 597 Bytes
Versions: 31
Compression:
Stored size: 597 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 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
31 entries across 31 versions & 1 rubygems