[Zope-CMF] How to cache CMF filesystem images?

Tres Seaver tseaver@zope.com
21 Mar 2003 22:31:37 -0500


On Fri, 2003-03-21 at 21:38, Ausum Studio wrote:
> How to cache CMF filesystem images?
> 
> While working with "folder_contents" I've noted that its icons get reloaded
> at every page view, different to icons from ZMI that do get cached by the
> browser. This same issue happens with logos or images from skins folders
> made out of directory views, which aren't available neither to any
> accelerated cache manager nor to a RAM one.

Two possibilities:

  - Associate the image with a cache manager, by giving it an attribute,
    'cache' (set this in its .properties file, in CMF 1.3, or in its
    .metadata file in the CVS HEAD).

  - Add a "CMF Caching Policy Manager' tool to your site, and set
    either its default policy, or else one which matches your images, to
    the caching interval you prefer.

Also, if you have customized the 'folder_contents' view, you should
verify that the URLs computed for the icons are all absolute; 
otherwise, they won't be cacheable by Squid.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com