redisable.rb 202 B

1234567891011
  1. # frozen_string_literal: true
  2. module Redisable
  3. def redis
  4. Thread.current[:redis] ||= RedisConfiguration.pool.checkout
  5. end
  6. def with_redis(&block)
  7. RedisConfiguration.with(&block)
  8. end
  9. end