Skip to content

Commit 56fa67d

Browse files
author
David Singleton
committed
Clear all static layouts when flushing cache
As part of emergency publishing we update static layout templates, which are page cached (to public, from where they're then served by nginx, not rails). We manually clear two of the layout files, but not `core_layout` which was more recently introduced. This is a pretty short term fix, and will break again if we add or rename a layout. A medium term solution is moving the uncaching logic to a static rake task, so that lives in the same place as the templates, and is less likely to fall out of sync. A longer term solution is using ESI, and side-stepping cachign entirely. As we've not gone for a medium or long term solution yet, this fixes the issue causing apps to not update after a emergency publishing/unpublishing
1 parent 3d7a590 commit 56fa67d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

campaigns.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def clear_static_generated_templates():
6666
This function clears the public/template directory to force it to
6767
be regenerated to include the emergency campaign.
6868
"""
69-
for template in ('wrapper.html.erb', 'header_footer_only.html.erb'):
69+
for template in ('wrapper.html.erb', 'header_footer_only.html.erb', 'core_layout.html.erb'):
7070
sudo('rm /var/apps/static/public/templates/{}'.format(template))
7171

7272

0 commit comments

Comments
 (0)