Sha256: 428fc950d7c7be527b6c57d55a6ce03308771d9d252f61b276b40a13cb36ec6d
Contents?: true
Size: 488 Bytes
Versions: 83
Compression:
Stored size: 488 Bytes
Contents
module Isomorfeus module Preact class MemcachedComponentCache def initialize(*args) @dalli_client = Dalli::Client.new(*args) end def fetch(key) json = @dalli_client.get(key) Oj.load(json, mode: :strict) end def store(key, rendered_tree, response_status, styles) json = Oj.dump([rendered_tree, response_status, styles], mode: :strict) @dalli_client.set(key, json) end end end end
Version data entries
83 entries across 83 versions & 1 rubygems