module Schemas::RedisStore
Constants
- EXPIRE
Public Instance Methods
redis_retrieve()
click to toggle source
# File lib/schemas/redis_store.rb, line 8 def redis_retrieve r = Redis.current.get(key) r ? JSON.parse(r) : [] end
redis_store!(schema_rows)
click to toggle source
# File lib/schemas/redis_store.rb, line 13 def redis_store!(schema_rows) Redis.current.del(key) Redis.current.set(key, JSON.generate(schema_rows)) # should be deleting the key before we store # but set expire just in case we switch keys in the code Redis.current.expire(key, EXPIRE) end