The expire accessor is used to change the default expiry
of a resource. It best used to set this:response in DPML. By default a
resource will have a absolute pessimistic expiry time that is the minima of all
dependent resources. Usually this would either be 0 (always expired) or a small
value into the future determined by one of our static resources need to recheck its
validity.
If no operator is supplied the resource is marked to expire immediately.
This will stop it from being cached and will tell external clients to assume
the value needs to be re-requested.(Assuming a transport can convey this information-
HTTPTransport can.)
If an operator is supplied it must be in the form shown above. Where
<value> must contain a parseable integer, and
<unit> must be one of second, minute,
hour, or day. It defines an offset from the current time
that the resource should expire. This will allow the resource to be cached for a
that period of time and inform external clients that the resources current value
is valid for that period of time. Any dependencies that might have cause the resource
to expire will be forgotten.
Tip: It can be very useful to force the expiry of this:response in a DPML process to
ensure a subsequent request will re-execute the process rather than receive the result from cache
when executing a processes thats primary purpose is to perform an action rather that return a
result.