Forum OpenACS Q&A: Re: Caching of OpenACS Web Pages by ISPs

Collapse
Posted by Geert De Witte on
Thanks to all that have provided advice on this topic.

Just to complete the thread, I'll just give feedback on the solution that we settled on.

We are running OpenACS 4.6.3 on the affected sites. We initially added the following statements to default-master.tcl to prevent the caching of pages:

ns_set put $headers "Expires" "Tue, 01 Jan 1980 1:00:00 GMT"
ns_set put $headers "Pragma" "no-cache"
ns_set put $headers "Cache-Control" "private"

This worked fine for all pages that used the default-master, but static pages and admin page eg. Ecommerce admin pages, don't use this template and were not being cached as we wished.

We then moved these statements to to the rp_handler procedure in packages/acs-tcl/tcl/request-processor-procs.tcl:
set headers [ad_conn outputheaders]
ns_set put $headers "Expires" "Tue, 01 Jan 1980 1:00:00 GMT"
ns_set put $headers "Pragma" "no-cache"
ns_set put $headers "Cache-Control" "private"

Once we had made this change, we had the caching behaviour that we required.

Once again, thanks to all those who helped,
Geert