Class: Istox::RedisManager
- Inherits:
-
Object
- Object
- Istox::RedisManager
- Defined in:
- lib/istox/helpers/redis_manager.rb
Class Method Summary collapse
-
.rate_limit_redis ⇒ Object
for rate limit redis cache.
-
.remote_model_redis ⇒ Object
for remote model cache.
-
.request_redis ⇒ Object
cache request to prevent double submission.
Class Method Details
.rate_limit_redis ⇒ Object
for rate limit redis cache
21 22 23 24 25 26 |
# File 'lib/istox/helpers/redis_manager.rb', line 21 def rate_limit_redis @rate_limit_redis ||= Redis::Namespace.new(:rate_limit_cache, redis: Redis.new( url: ENV['REDIS_URL'] || 'redis://127.0.0.1:16379', db: 6 )) end |
.remote_model_redis ⇒ Object
for remote model cache
5 6 7 8 9 10 |
# File 'lib/istox/helpers/redis_manager.rb', line 5 def remote_model_redis @remote_model_redis ||= Redis::Namespace.new(:platform_cache, redis: Redis.new( url: ENV['REDIS_URL'] || 'redis://127.0.0.1:16379', db: 5 )) end |
.request_redis ⇒ Object
cache request to prevent double submission
13 14 15 16 17 18 |
# File 'lib/istox/helpers/redis_manager.rb', line 13 def request_redis @request_redis ||= Redis::Namespace.new(:request_cache, redis: Redis.new( url: ENV['REDIS_URL'] || 'redis://127.0.0.1:16379', db: 6 )) end |