[Zope] image caching

Tino Wildenhain tino@wildenhain.de
Sun, 20 May 2001 12:21:15 +0200


Hi kosh,

you should either override the index_html method of the
image class or use the optional argument "precondition" on the
image constructor to register a method which gets called
every time a image (or a file) is published.
This way you can set headers and such.

HTH
Tino Wildenhain

--On Samstag, 19. Mai 2001 20:07 +0000 kosh@aesaeion.com wrote:

> I have a class that wraps images and I want to be able to set the HTTP
> headers for the object when it is requested. Which method do you need to
> override in my python product to catch all requests to that object?
>
> Currently the structure is set up such that I have a Picture object and in
> its dict I store a regular zope Image object. It also stores a thumbnail
> and a good bit of other information. I want to override however that image
> gets handed off to the browser or to the rest of zope.
>
> Designing the webpages of tomorrow http://webme-eng.com
> Designing the MMORPGS of tomorrow http://worldforge.org
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )