about summary refs log tree commit diff
path: root/app/models/concerns/redisable.rb
blob: 0dad3abb2b3e0ae575025a63de3f9873a34eab0b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

module Redisable
  def redis
    Thread.current[:redis] ||= RedisConfiguration.pool.checkout
  end

  def with_redis(&block)
    RedisConfiguration.with(&block)
  end
end