Mark, this sounds like a great plugin.  I especially like the fact that
it would deal with all the HTTP headers, since that's something I can
never keep straight.

Cees Hek <[EMAIL PROTECTED]> wrote:
> On 10/14/05, Michael Peters <[EMAIL PROTECTED]> wrote:
> > I also think having caching on the run mode level would help CAF out
> > with 'Embedded Components'. This way you could cache some of the
> > semi-dynamic portions of page but putting it into another 'Cacheable'
> > run mode.

Yeah, I've got a perfect candidate for this!  I've got an embedded run
mode that displays a user-specific menu of documents.  The menu is built
on every request, and I know it's not cheap to do so.

...
> What if the user were to write a simple method that defined all the
> dynamic elements for the current request, and the Cachable methods
> configured which ones they depended on:
>
> sub dynamic {
>   my $self = shift;
>   return {
>     username => $self->authen->username,
>     product_id => $self->query->param('product_id');
>   };
> }
>
> # cache should consider the username parameter when retrieving the page
> sub my_homepage :Cache( 10min, username ) { ... }
>
> # cache should consider the product_id parameter
> sub view_product :Cache( 30min, product_id ) { ... }
>
> # cache should consider the product_id parameter and username parameter
> sub buy_product :Cache( 30min, product_id, username ) { ... }

This looks very useful to me.

...
> Another caching aspect that I like is permanent caches that are only
> expired when a change to the underlying data is made.  Using the
> product example above, the product description and details will
> probably not change in the next 30 minutes.  So why can't we cache it
> permanently, and invalidate the cache when a product update is
> performed by the administrator.

Or you could have a serial number that gets incremented whenever an
administrator makes changes.  Then include the serial number in the
user's session and use that as one of the cache elements.


Michael


---
Michael Graham <[EMAIL PROTECTED]>



---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to