Sha256: 2b01a782804f4cdd82e55326adc456ed01483a3f7a1f000fc8d424f2d5852efe
Contents?: true
Size: 420 Bytes
Versions: 9
Compression:
Stored size: 420 Bytes
Contents
require "redis" module Socrates module Storage class Redis def initialize(url: "redis://localhost") @redis = ::Redis.new(url: url) end def has_key?(key) @redis.exists(key) end def clear(key) @redis.del(key) end def get(key) @redis.get(key) end def put(key, value) @redis.set(key, value) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems