Sha256: 3eff0f5571e5518418384f18581d5361304f0d9c8963e7ee1238ba34054bec81
Contents?: true
Size: 351 Bytes
Versions: 2
Compression:
Stored size: 351 Bytes
Contents
# frozen_string_literal: true require 'redis' module Cache class Redis class << self def set(key, value, expiry = 3600) redis.set(key, value, ex: expiry) end def get(key) redis.get(key) end private def redis @redis ||= Redis.new(url: ENV['REDIS_URL']) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sensei_eod_utils-0.0.33 | lib/cache/redis.rb |
sensei_eod_utils-0.0.32 | lib/cache/redis.rb |