Sha256: fa5941bb1e7cb7f764bcb36fadecc2c2fcf761d6537b46027b278a20554d9d23
Contents?: true
Size: 476 Bytes
Versions: 83
Compression:
Stored size: 476 Bytes
Contents
module Isomorfeus module Preact class RedisComponentCache def initialize(*args) @redis_client = Redis.new(@args) end def fetch(key) json = @redis_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) @redis_client.set(key, json) end end end end
Version data entries
83 entries across 83 versions & 1 rubygems