On Sat, Mar 23, 2002 at 07:58:37AM +0100, Andreas J. Koenig wrote: > [bounced to list with permission] > > Hi Barrie, > > thanks for your article > http://www.perl.com/pub/a/2002/03/12/axkit.html, it's a great help to > me to get an overview. I'm interested in AxKit since it exists but > always missed the starter kit. I hope to come around to use it in a > future project. > > But one thing is there in your article that is probably misleading: > > Note that AxKit is smart enough to not cache the output document > (there's no cache between the XSP processor and the output); XSP is > intended for dynamic pages and its output documents should not be > cached. > > I do not believe that dynamic pages should not be cached, it's all a > matter of expiration times. Even dynamic pages can have a long > expiration time and should be cached if the cost of caching is lower > than the cost of recalculating. > > Take for example a big search engine where every query sucks up high > resources. Now when every five seconds it gets a hit querying "sex", > you will not want to redo the query every time, you will want to send > a cached answer. You will want to set an expiration time for all > queries and you will want to tune the expiration time depending on > some parameters like available resources, time, day of the week, etc. > > Take for example a page that displays the time including seconds. Many > people will believe that this should not be cached. I'd argue, it > should be cached until the displayed second increments. And if you do > that, you can save resources whenever somebody doubleclicks a button. > > I'm not saying that AxKit *must* do that for me, I solve these > problems mostly with squid, but it would be a big plus if it were able > to do it. > > Maybe you want to differentiate in a future column on this aspect of > caching? > > Just a thought. > > Thanks again & Regards, > -- > andreas
I agree w/ much of what your saying. My work around is to use has_changed () cache_params () I'm not aware if the behavior/usage is documented for xsp's but the code is in Apache::AxKit::Language::XSP::Page. The corresponding debug message is 'XSP results cached' At least this allows me to head off re-generating the heavy work. Ed --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
