[Catalyst] C::P::PageCache patch for reducing duplicate processing

Toby Corkindale toby at ymogen.net
Fri Jun 23 12:12:32 CEST 2006


Wade.Stuart at fallon.com wrote:
> 
> 
> 
> 
> 
> 
> catalyst-bounces at lists.rawmode.org wrote on 06/22/2006 01:37:13 PM:
> 
>> Toby Corkindale wrote:
>>> Hi,
>>> There's a patch attached for Catalyst::Plugin::PageCache.
>>> (It's not final, but more a "request for comments" on it so far. In
>>> particular, some better way than using flock())
>> Why not just use pid+tid and a cache key set/get to see if you're the one
> 
>> doing the building ...
> 
> Or have the first hit after the expire set the expire time counter to the
> next interval so the next hit does not even think to rebuild.  Then you can
> also rebuild the cache to a temp name and overwrite the current cache when
> it is complete.  This way to sleeping is required on long building pages
> with many hits (they all just serve the old page until the new one
> overwrites in an atomic write).


That sounds like a good plan. I'm slightly worried that it breaks the 
notion that cached objects are guaranteed to expire in a given period of 
time.. but generally that doesn't need to be accurate to the second.

I'll look into modifying the code to match.

-Toby



More information about the Catalyst mailing list