Created
July 9, 2024 19:48
-
-
Save julianrubisch/9fc865ac94f52c54ae26cc68f0db7b7d to your computer and use it in GitHub Desktop.
Revisions
-
julianrubisch created this gist
Jul 9, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ Rails.application.config.after_initialize do Sitepress::SiteController.include(Sitepress::HttpCaching) end module Sitepress::HttpCaching extend ActiveSupport::Concern included do before_action do fresh_when current_resource.asset.updated_at if !!current_resource.data["cache"] end end end