Forum OpenACS Q&A: aolserver caching and squid
I've never tried it, but I think normally you would never want to cache pages served from OpenACS by default in Squid, as many pages are customized for the user viewing them, and Squid presumably has no way to distinguish one OpenACS user from another. On the other hand, cacheing images or static content in Squid might be useful for some sites. (It might however be better just to serve that content separately with a different special purpose web server in the first place. The guys using AOLserver at AOL definitely do that.)
OpenACS uses AOLserver to cache all sorts of stuff, but it is probably all stuff a lower level than complete HTML pages, and then is used to assemble dynamically generated pages, which would make pretty distinct from anything you'd ever consider caching with Squid.
I think AOLserver's Fastpath code will cache the contents of static files in RAM, which would overlap to some degree with Squid-like cacheing, but I don't know whether Fastpath even works with OpenACS.
I believe it takes effect in two cases.
1) Items under resources that are served directly out of the filesystem. This probably isn't a big deal because most of these items are cached on the client side anyway.
2) Any time ns_returnfile is called, such as when cr_write_content is called on filesystem stored content items. Most of these items are probably too big to be cached by fastpath.
So if you have large static files, it might be useful if you could configure squid to just cache those items. But as Andres said, you might want to use a different web server to handle those as well.
To clarify what I'm trying to achieve here:
On the site Im running I have a lot of static adp pages with "include" page for general comments and another "include" for a picture from photo-album.
I would like to be able to cache those pages as they do not change so often only when a new comment is added.
Also I would like to cache all photo-album pages.
I don't remember exactly what the OpenACS templating system does and doesn't cache, but I'd be surprised if you have any real need to cache ADP pages. The ADP processing itself should be awfully fast, otherwise AOL wouldn't be able to use it on their huge public sites. If you are seeing a performance problem, the culprit is probably elsewhere. So far I've seen no reason to believe that you should be adding any caching at all.
However, perhaps the general comments pages you are including are doing something wrong (poor query, which good be fixed or perhaps cached). Or your AOLserver could be misconfigured (e.g., thread settings). We can't know until you dig into the symptoms a bit more, and then describe them to us.
Remember, caching is not a problem, caching is a solution - but maybe (likely, even) not the right solution for your problem.