Controlling Response Cache Entries Dynamically
You can use HTTP headers in requests or responses to provide individual control of cache entries that override all other cache configuration. This uses the HTTP Cache-Control header.
You can add HTTP headers to requests to run mashables or mashups using
MashZone NextGen Connect or the
MashZone NextGen REST API. To set caching headers in responses, wrap requests to run mashables in a mashup and use
EMML statements in the mashup to add the HTTP headers to the response.
See Adding HTTP Headers to the Mashup Result for instructions.Where you add this header and the specific value determines the effect:
To ensure that the response is no older than a specific number of milliseconds, set one of the following HTTP headers in a
request to invoke a mashable or mashup:
CACHE-CONTROL: "max-age=number-of-seconds" max-age=number-of-seconds To set the maximum age of a new cache entry created for a specific response, set one of these HTTP headers in the mashable or mashup
response:
CACHE-CONTROL: "max-age=number-of-seconds" max-age=number-of-seconds To force the
MashZone NextGen Server to discard the current cache entry and invoke a mashable or mashup, set one of these HTTP headers in the mashable or mashup
request:
CACHE-CONTROL: no-cache no-cache To ensure the current response is
not cached, set one of these HTTP headers in the mashable or mashup
response:
CACHE-CONTROL: no-cache no-cache