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 Genero Application Server 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 GAS configuration file. When the GAS 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
The standalone dispatcher (httpdispatch), as a development tool, always ignores this configuration entry and will force the maximum duration for caching to one second:
Cache-Control: max-age=1

Usage example

<INTERFACE_TO_CONNECTOR>
  ...
  <HTTP>
     <SESSION_COOKIE Secure="FALSE" />
     <CACHE_CONTROL_MAX_AGE>300</CACHE_CONTROL_MAX_AGE>
     <!-- Applications custom headers -->
     ...
  </HTTP>
</INTERFACE_TO_CONNECTOR>

Parent elements

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