about summary refs log tree commit diff
path: root/config/initializers
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-11-27 20:37:37 +0100
committerGitHub <noreply@github.com>2022-11-27 20:37:37 +0100
commitd587a268fdcee4ab8795fe4f03dff683e668ae15 (patch)
treecbe3c261f4455415fbbfb5ec1b2bcb76136f5529 /config/initializers
parent14e2354eeaf1f89a0f81302aa92661977be15daf (diff)
Add logging for Rails cache timeouts (#21667)
* Reduce redis cache store connect timeout from default 20 seconds to 5 seconds

* Log cache store errors
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/cache_logging.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/config/initializers/cache_logging.rb b/config/initializers/cache_logging.rb
new file mode 100644
index 000000000..08aa80742
--- /dev/null
+++ b/config/initializers/cache_logging.rb
@@ -0,0 +1,3 @@
+# Log cache errors with Rail's logger
+# This used to be the default in old Rails versions: https://github.com/rails/rails/commit/7fcf8590e788cef8b64cc266f75931c418902ca9#diff-f0748f0be8a653eea13369ebb1cadabcad71ede7cfaf20282447e64329817befL86
+Rails.cache.logger = Rails.logger