[Zope] Cacheing

Evan Simpson evan@4-am.com
Tue, 14 Sep 1999 16:42:39 -0500


"Ross J. Reedstrom" wrote:

> On Tue, Sep 14, 1999 at 02:24:21PM -0500, Evan Simpson wrote:

[snip]

>
> > (unless rendering the object is **very**
> > expensive; what then?).
>

[snip again]

>
> Personally, I can't think of an example of an object that would be _that_
> expensive to render: What sort of thing are you envisioning in that catagory,
> that wouldn't already be represented as it's own object?

<shrug> The possibility occurred to me, so I thought I'd mention it, but I like
your solution just fine.  The only example I can think of isn't necessarily
*expensive* to render, it's just *unreliable*: Suppose you're drawing on other
websites for content, as in a Slashbox.  Contacting the other site can take an
unpredictable amount of time, and may fail.  If it fails, you don't want a broken
object, you just want to keep the results of the last successful render.  As you
point out, in this situation it would probably be best to have a special object to
explicitly store the result, and use some sort of scheduling mechanism to call a
re-render-attempt method on it periodically.