Fix caching crashes in localized_cache

The controller was like "oh yeah we have that cached" (from previous renders of the app on Rails 3 I think?), but the view disagreed, bc it was appending a template digest to the cache key. That's a smart feature, but not compatible with how we skip queries in the controller, so disable it for now!
This commit is contained in:
Matchu 2023-07-22 12:52:53 -07:00
parent 3020def570
commit a705bfc34e

View file

@ -127,7 +127,9 @@ module ApplicationHelper
def localized_cache(key={}, &block) def localized_cache(key={}, &block)
localized_key = localize_fragment_key(key, locale) localized_key = localize_fragment_key(key, locale)
cache(localized_key, &block) # TODO: The digest feature is handy, but it's not compatible with how we
# check for fragments existence in the controller, so skip it for now.
cache(localized_key, skip_digest: true, &block)
end end
def login_path_with_return_to def login_path_with_return_to