Forum OpenACS Q&A: Re: Strange cross-caching of users

Collapse
Posted by Jon Griffin on
Actually, in terms of efficiency, expr is much faster than both.

The ability to use expr with the eq ne keywords is new though so you would have to use AOL >= 3.5, which allows you to use a real version of tcl instead of the builtin one.

The OACS recommended version of AOLserver is showing its age and we should be recommending the newest AOL. (of course acs-lang in the head won't work).

Collapse
Posted by Bart Teeuwisse on

Jon, Tilmann,

I agree with you both. Yes, caching should really be part of the request processor. Especially since I made a small but crucial mistake in the above code. The cache-control filter should be registered as a postauth filter rather than a trace filter. A trace filter isn't executed till after the connection closes.

I hadn't noriced because ACS developer support had me fooled for a while as the cache control headers did show up in the request information of ACS developer support. Delorie has a cool HTTP Header Viewer to inspect headers of Internet accessible sites with.

There is a lot more to controlling caching than this simple script handles. Postauth filters for example, are run before the request processor and hence it is impossible to use [ad_conn] to find out if the request was for a static file or not. Robert pointed out some of the other short comings.

Which ever solution will be adopted I belief that it should be part of the request processor where it can better distinguish between content material (dynamic, static, image, content type, etc) and the appropriate action. The final solution should leave room for customization, e.g. cache some parts of a site longer than others.

/Bart

Collapse
Posted by Jeff Davis on
Some issues I see: .css$ etc will also match "xcss" and you should say switch -regexp -- $url since urls starting with "-" will break the filter. It ignores whether the headers have been set already which means if you have a .vuh handler or dynamically generated images etc which might do something like vuhhandler/21987/foo.css you won't have any way to disable it.