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

Andy McKay andy@agmweb.ca
Sun, 30 Mar 2003 09:54:36 +0100


>> What Tres said, but note putting Images or Files in a RAM Cache 
>> manager has no effect ;)
> 
> What do you mean by 'has no effect'?

The effect is none. Put an image in a Ram Cache Manager and it misses
every time, the image is not cached. I guess the theory is, you wouldnt
want to put that 10mb document in memory would you? (although it would
be nice to let the user have that choice)

Lines 374-5 of OFS/Image.py

         # Don't cache the data itself, but provide an opportunity
         # for a cache manager to set response headers.
         self.ZCacheable_set(None)

I think this should be up to the cache manager, rather than the content
type. For example the FS Cache Manager, likes large files and handles
them quite nicely. Perhaps, sn option on RAM Cache Manager which says
only cache files smaller than certain sizes would be nice.
-- 
   Andy McKay