Sha256: 36f5361ea3f3b443207e35243b5f5350085cc7997d70aa43a15f46bdbb0d710c
Contents?: true
Size: 418 Bytes
Versions: 2
Compression:
Stored size: 418 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
socrates-0.1.9 | lib/socrates/storage/redis.rb |
socrates-0.1.8 | lib/socrates/storage/redis.rb |