0
0
Fork 0

Fix custom css cache miss (#33583)

This commit is contained in:
Jeong Arm 2025-01-14 17:24:00 +09:00 committed by GitHub
parent 77a44e61a8
commit 74da9e9281
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 25 additions and 4 deletions

View file

@ -45,7 +45,9 @@ module ThemeHelper
end
def cached_custom_css_digest
Rails.cache.read(:setting_digest_custom_css)
Rails.cache.fetch(:setting_digest_custom_css) do
Setting.custom_css&.then { |content| Digest::SHA256.hexdigest(content) }
end
end
def theme_color_for(theme)