2019-02-02 20:11:38 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Redisable
|
|
|
|
def redis
|
2022-04-29 23:43:07 +03:00
|
|
|
Thread.current[:redis] ||= RedisConfiguration.pool.checkout
|
2019-02-02 20:11:38 +02:00
|
|
|
end
|
2022-05-13 01:02:35 +03:00
|
|
|
|
|
|
|
def with_redis(&block)
|
|
|
|
RedisConfiguration.with(&block)
|
|
|
|
end
|
2019-02-02 20:11:38 +02:00
|
|
|
end
|