Commit 29b4bac3 authored by Nicolas Delaby's avatar Nicolas Delaby

Use web_caching_policy manager to setup HTTP Cache

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36216 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3cc7a56b
......@@ -468,6 +468,12 @@ class OOoDocument(PermanentURLMixIn, BaseConvertableFileMixin, File,
archive_file.close()
def _getExtensibleContent(self, request, name):
# Be sure that html conversion is done,
# as it is required to extract extensible content
self._convert(format='html')
web_cache_kw = {'name': name,
'format': '_embedded'}
_setCacheHeaders(_ViewEmulator().__of__(self), web_cache_kw)
try:
mime, data = self.getConversion(format='_embedded', file_name=name)
return OFSFile(name, name, data, content_type=mime).__of__(self.aq_parent)
......
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