Info |
---|
|
Proxy cache headers for use with reverse proxies and other proxy mechanisms were added in the 6.0.11 milestone release. |
To simplify adding cache headers to pages, the upcoming 6.0.11 release adds support for the @@proxyCacheTimeout decorators to webskins. This value specifies the number of seconds that webskin should be cached for. The smallest value specified when constructing a page is added to the header using the max-age and s-maxage headers, or as a set of no-cache headers if 0.
By default, FarCry doesn't add cache headers when no webskin specifies a proxy cache timeout. Use the defaultProxyCacheTimeout constructor setting to change this behaviour. To default to a 2 minute cache:
Code Block |
---|
| xml |
---|
| xml |
---|
title | farcryConstructor.cfm |
---|
|
<cfset this.defaultProxyCacheTimeout = 120 /> |
If you want FarCry to default to no-cache headers:
Code Block |
---|
| xml |
---|
| xml |
---|
title | farcryConstructor.cfm |
---|
|
<cfset this.defaultProxyCacheTimeout = 0 /> |
Tip |
---|
As well as the typical response headers, META tags and an html comment are added to the page with the response headers. These can help troubleshoot issues with reverse proxies. e.g.: Code Block |
---|
|
<META HTTP-EQUIV="Cache-Control" CONTENT="max-age=120,s-maxage=120" /><>
<!-- Page cached until: Mon, 28 Feb 2011 10:40:58 GMT+11 (120 seconds) -->
|
|
Code Block |
---|
Cache-Control max-age=120,s-maxage=120 |
...