[Catalyst] Simple caching question

Jesse Sheidlower jester at panix.com
Fri Nov 7 16:02:51 GMT 2008

On Fri, Nov 07, 2008 at 08:19:46AM -0600, Peter Karman wrote:
> Jesse Sheidlower wrote on 11/07/2008 08:02 AM:
> > On Thu, Nov 06, 2008 at 05:23:29PM -0500, Jesse Sheidlower wrote:
> >> Given how light my requirements are--the app's been chugging
> >> along fine for years without any caching--I don't think I need
> >> to bother putting another app into the mix. The memory
> >> requirements for Memcached don't worry me--the server never
> >> goes down, and even if it did, another round of database
> >> retrievals wouldn't hurt anybody--but if it's something that
> >> needs managing, I'll just go with FastMmap and see how that
> >> works.
> > 
> > Hmm.
> > 
> > I'm not sure what's going on, but PageCache is actually making
> > my app _slower_. Regardless of where I put the config stuff,
> > on my laptop running ab I'm seeing about 38-39 requests/sec
> > running without PageCache, but 35-36 with.
> I've seen that before when the pages weren't actually being cached. It
> was likely misconfig on my part, but in the end I switched to the File
> cache backend because It Just Worked.

Actually, the problem was my regex. I was trying to do a
negative match, and this didn't work with the auto_cache code;
nothing was getting cached. An embarrassingly large amount of
thought, and I came up with this:

    auto_cache => [ '\/((?:(?!search).)+)' ],

and I'm on my way. Things are anywhere from 50% to 350% faster. If
I could only solve the Config::General problem, everything would be

Thanks, all.


More information about the Catalyst mailing list