Skip to content

Commit 8babc4b

Browse files
committed
fix: adjust redis cache store
1 parent 67760c6 commit 8babc4b

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

config/environments/production.rb

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,16 @@
3333

3434
# Use Redis for caching if available, otherwise fall back to memory store
3535
config.cache_store = if ENV['REDIS_URL'].present?
36-
:redis_cache_store, {
37-
url: ENV['REDIS_URL'],
38-
reconnect_attempts: 3,
39-
error_handler: ->(method:, returning:, exception:) {
40-
Rails.logger.warn "Rails cache Redis error: #{exception.message}"
36+
[
37+
:redis_cache_store,
38+
{
39+
url: ENV['REDIS_URL'],
40+
reconnect_attempts: 3,
41+
error_handler: ->(method:, returning:, exception:) {
42+
Rails.logger.warn "Rails cache Redis error: #{exception.message}"
43+
}
4144
}
42-
}
45+
]
4346
else
4447
:memory_store
4548
end

0 commit comments

Comments
 (0)