# 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