[Seaside-dev] [Seaside] Requests & Components Caching

Philippe Marschall philippe.marschall at gmail.com
Sun Mar 13 10:34:20 UTC 2011


2011/3/7 Avi Shefi <avishefi at gmail.com>:
> Hi all,
> I've taken the time to implement issue 435 and encountered some issues.
>
> 1. I have created a caching filter which caches the response according to
> the request URL using WACache. It uses the request url without the query
> params (i.e. aRequestContext request url withoutQuery). This causes problems
> however with WAComponent>>#script, which uses the same URL (without query
> params) and therefore serves the content of the page (instead of the
> contents of the #script method). Any suggestions how to solve this?

Include the query parameters in the cache key as well?

> 2. I think it's also important to provide component caching,

I don't think we wanna go there.

> so that
> individual components can be cached. (Rational: navigation components that
> pull data from databases should be cached, instead of generated each time)

That should be the responsibility of the database layer (ie. Glorp) or
business layer but not the GUI layer (Seaside).

> I
> guess the way to do this is to add a decoration around a component, and use
> that as a cache for the component's contents. However, the contents of the
> component is inserted through a canvas, which writes its contents directly
> to the returned document. We can use an additional document and get its
> output specifically for the component caching, however this feel a bit
> awkward. Any other ideas how to get a component's output so it can be
> cached?

Cheers
Philippe


More information about the seaside-dev mailing list