[Zope] Caching ImageFiles
Peter Bengtsson
peterbe at gmail.com
Thu Sep 8 12:23:53 EDT 2005
This might be a FAQ but I'm willing to take a chance.
In class ImageFile (from App/ImageFile.py) the following headers are
set when you view an ImageFile object:
<pseudocode>
'Content-Type': self.content_type
'Last-Modified': self.lmh # RFC1123
'Cache-Control': 'public,max-age=3600'
</pseudocode>
What is the difference between 'Cache-Control' and 'Expires'?
What is best to use and for what?
I no longer know exactly why but in all my stylesheet DTML methods I set
'Expires': (DateTime()+10/24.0).rfc822() # 10 hours
but not the 'Cache-Control'.
Should I use both?
--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
More information about the Zope
mailing list