CACHE_CONTROL_MAX_AGE

The CACHE_CONTROL_MAX_AGE element specifies a setting for a HTTP Cache-Control header when a file is cacheable.

Syntax

<CACHE_CONTROL_MAX_AGE> seconds </CACHE_CONTROL_MAX_AGE>
  1. seconds specifies in seconds the time allowed for holding files in the cache.

Child elements

There are no child elements.

Usage

You use the CACHE_CONTROL_MAX_AGE element to define the duration files sent by the JGAS are held in front-end cache. The value of 300 seconds is the default, as configured in the CACHE_CONTROL_MAX_AGE element of the JGAS configuration file. When the JGAS sends a file to the front-end, if the file is cacheable, the header Cache-Control is added in the message response, for example:
Cache-Control: max-age=300

Usage example

<INTERFACE>
  ...
  <HTTP>
     <SESSION_COOKIE Secure="FALSE" />
     <CACHE_CONTROL_MAX_AGE>$(cache.control.max.age)</CACHE_CONTROL_MAX_AGE>
     <!-- Applications custom headers -->
     ...
  </HTTP>
</INTERFACE>

The resource cache.control.max.age is set to the default value of 300 seconds. You can override this by changing the resource value.

Parent elements

This element is a child of the HTTP (Common) element.