Skip to content

Commit 3d49b23

Browse files
committed
Skip http cache for custom color scheme
1 parent 49a7088 commit 3d49b23

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/controllers/site_controller.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,15 @@ def process_rendition(rendition)
2929
# @param rendition [Sitepress::Rendition] Rendered representatio of current_resource
3030
#
3131
def post_render(rendition)
32-
if current_path?(root_path) || stale?(rendition.source, last_modified: current_resource.asset.updated_at.utc, public: true)
32+
if skip_http_cache? || stale?(rendition.source, last_modified: current_resource.asset.updated_at.utc, public: true)
3333
render body: rendition.output, content_type: rendition.mime_type
3434
end
3535
end
3636

37+
def skip_http_cache?
38+
current_path?(root_path) || custom_color_scheme?
39+
end
40+
3741
def current_path?(path)
3842
request.path == path
3943
end

0 commit comments

Comments
 (0)