We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49a7088 commit 3d49b23Copy full SHA for 3d49b23
app/controllers/site_controller.rb
@@ -29,11 +29,15 @@ def process_rendition(rendition)
29
# @param rendition [Sitepress::Rendition] Rendered representatio of current_resource
30
#
31
def post_render(rendition)
32
- if current_path?(root_path) || stale?(rendition.source, last_modified: current_resource.asset.updated_at.utc, public: true)
+ if skip_http_cache? || stale?(rendition.source, last_modified: current_resource.asset.updated_at.utc, public: true)
33
render body: rendition.output, content_type: rendition.mime_type
34
end
35
36
37
+ def skip_http_cache?
38
+ current_path?(root_path) || custom_color_scheme?
39
+ end
40
+
41
def current_path?(path)
42
request.path == path
43
0 commit comments