URL-Specific Cache-Control Configuration in Access Gateway
search cancel

URL-Specific Cache-Control Configuration in Access Gateway

book

Article ID: 439461

calendar_today

Updated On:

Products

SITEMINDER

Issue/Introduction

We currently have a global Cache-Control setting configured in httpd.conf as shown below:

Header always set Cache-Control "no-cache, no-store, must-revalidate, max-age=0"

 
However, the application team requires the following Cache-Control value for a specific URL: Cache-Control: max-age=1296000, public, immutable
 

We would like your guidance on how to configure this Cache-Control value only for a single URL that is configured on the Access Gateway

Environment

Access Gateway 12.9

Resolution

Use <Location> Directive. It will "Applies the enclosed directives only to matching URLs" as per Apache document,

https://httpd.apache.org/docs/current/mod/core.html#location

 

For example,

<VirtualHost ...>
...
  <Location "/your-specific-url-path">
      Header always set Cache-Control "max-age=1296000, public, immutable"
  </Location>
</VirtualHost>

Additional Information

https://httpd.apache.org/docs/current/mod/core.html#location

https://httpd.apache.org/docs/current/mod/core.html#locationmatch