Class: Gitlab::Redis::Cache
- Defined in:
- lib/gitlab/redis/cache.rb
Constant Summary collapse
- CACHE_NAMESPACE =
'cache:gitlab'
Constants inherited from Wrapper
Class Method Summary collapse
-
.active_support_config ⇒ Object
Full list of options: api.rubyonrails.org/classes/ActiveSupport/Cache/RedisCacheStore.html#method-c-new pool argument event not documented in the link above is handled by RedisCacheStore see: github.com/rails/rails/blob/593893c901f87b4ed205751f72df41519b4d2da3/activesupport/lib/active_support/cache/redis_cache_store.rb#L165 and github.com/rails/rails/blob/ad790cb2f6bc724a89e4266b505b3c57d5089dae/activesupport/lib/active_support/cache.rb#L206.
- .default_ttl_seconds ⇒ Object
Methods inherited from Wrapper
config_fallback, config_file_name, config_file_path, #db, #initialize, instrumentation_class, #params, pool, pool_size, rails_root, redis_yml_path, #sentinels, #sentinels?, #store, store_name, #url, version, with
Constructor Details
This class inherits a constructor from Gitlab::Redis::Wrapper
Class Method Details
.active_support_config ⇒ Object
Full list of options: api.rubyonrails.org/classes/ActiveSupport/Cache/RedisCacheStore.html#method-c-new pool argument event not documented in the link above is handled by RedisCacheStore see: github.com/rails/rails/blob/593893c901f87b4ed205751f72df41519b4d2da3/activesupport/lib/active_support/cache/redis_cache_store.rb#L165 and github.com/rails/rails/blob/ad790cb2f6bc724a89e4266b505b3c57d5089dae/activesupport/lib/active_support/cache.rb#L206
15 16 17 18 19 20 21 22 23 |
# File 'lib/gitlab/redis/cache.rb', line 15 def active_support_config { redis: pool, pool: false, compress: Gitlab::Utils.to_boolean(ENV.fetch('ENABLE_REDIS_CACHE_COMPRESSION', '1')), namespace: CACHE_NAMESPACE, expires_in: default_ttl_seconds } end |
.default_ttl_seconds ⇒ Object
25 26 27 |
# File 'lib/gitlab/redis/cache.rb', line 25 def default_ttl_seconds ENV.fetch('GITLAB_RAILS_CACHE_DEFAULT_TTL_SECONDS', 8.hours).to_i end |