Sha256: 7ff79249f4277ca7d481c65a96b00d5d3781cc0a0be1e59e414666c5c2ebef43
Contents?: true
Size: 593 Bytes
Versions: 13
Compression:
Stored size: 593 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, options = {}) internal_store[key] = value end def transform_key(key) cache_prefix ? "#{cache_prefix}/#{key}" : key end end end end
Version data entries
13 entries across 13 versions & 1 rubygems