# 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