Sha256: 50684d2049d8d1406df900e7b24b5bdb43a1a5f620c1539ac28b32e288a84feb
Contents?: true
Size: 354 Bytes
Versions: 15
Compression:
Stored size: 354 Bytes
Contents
# frozen_string_literal: true require 'redis' module Cache class RedisCache class << self def set(key, value, expiry = 3600) cache.set(key, value, ex: expiry) end def get(key) cache.get(key) end private def cache @cache ||= Redis.new(url: ENV['REDIS_URL']) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems