Hello, I applied the patch, and caching now works (thanks Gerald!). I tested the following lines in my httpd: EMBPERL_CACHE_KEY_OPTIONS 0 EMBPERL_CACHE_KEY_FUNC "sub {return $ENV{REQUEST_URI}}" Which seems to have solved my problem of the cache not making the distinction between: http://host/foobar and http://host/helloworld I don't see a way to explicity tell EmbPerl to 'not cache' certain pages. I ended up making the cache_key_func call another sub that performed additional logic to set the key to "", and I used a EMBPERL_EXPIRES_FUNC to always expiring those queries. The benchmark results so far show a very significant improvement (>2x) when replaying the user logs for a duration of time about as long as the expiration time. I have a lot of queries to the home-page for each city, so caching those alone is significant. Incase anybody is currious to see another EmbPerl site, mine is at (http://beethere.net/). I should have caching on the live site in the next couple days. The only awkwardness I'm now seeing is that Embperl seems to sometimes call the cache_key_function multiple times per request. I added a 'print STDERR 'FOO' to the sub, and I occationally see the message get printed multiple times (~11). I highly recommend applying the patch, and giving caching a whirl. It's a nice performance gift from Gerald, and easier to set up than most dedicated caching systems. Happy Holidays, -Carl
----- Original Message ---- From: Gerald Richter <[EMAIL PROTECTED]> To: Carl Eklof <[EMAIL PROTECTED]>; embperl@perl.apache.org Sent: Wednesday, December 21, 2005 00:13:30 Subject: RE: Using EmbPerl's Caching Functionality Hi, > 1) I couldn't get EMBPERL_CACHE_KEY_FUNC, or > EMBPERL_EXPIRES_FUNC to work in my httpd.conf (and I do have > Embperl_UseEnv on) Trying to set either one would cause > Apache to seg fault. > >... > Does anybody have any working sample of the EMBPERL_CACHE_KEY_FUNC? > The attached patch should fix both the xx_FUNC parameters in httpd.conf. Note that EMBPERL_CACHE_KEY_FUNC can only be defined in httpd.conf, but not inside the page itself (as EMBPERL_EXPIRES_FUNC does) Gerald ** Virus checked by BB-5000 Mailfilter ** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]