Commit 40234eeb authored by Romain Courteaud's avatar Romain Courteaud

[erp5_officejs_appstore_base] Force refreshing the manifest

Prevent CDN cache inconsistency
parent feb80bd3
......@@ -4,8 +4,9 @@ if response is None:
response = REQUEST.RESPONSE
web_section = context
modification_date = max(web_section.Base_getWebDocumentDrivenModificationDate(), DateTime().earliestTime() + (DateTime().hour() /24.0)).rfc822()
if REQUEST.getHeader('If-Modified-Since', '') == web_section.getModificationDate().rfc822():
if REQUEST.getHeader('If-Modified-Since', '') == modification_date:
response.setStatus(304)
return ""
......@@ -13,4 +14,4 @@ response.setHeader('Content-Type', 'text/cache-manifest')
response.setHeader('Cache-Control', 'max-age=0, public, must-revalidate')
return """CACHE MANIFEST
# %s + hash""" % context.getLayoutProperty("configuration_latest_version", default="development")
# %s / %s""" % (context.getLayoutProperty("configuration_latest_version", default="development"), modification_date)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment