expire
Sets an expiration period on a resource
Index > Books > Declarative Development Guide > Reference Library > Accessor Listing > expire

Rate this page:
Really useful
Satisfactory
Not helpful
Confusing
Incorrect
Unsure
Extra comments:


Module

urn:org:ten60:netkernel:ext:sys

Definition

Active URI Base

active:expire

Format

<instr>
  <type>expire</type>
  <operand>something.xml</operand>
  <operator>
    <expire>
      <value>1</value>
      <unit>hour</unit>
    </expire>
  </operator>
</instr>

Syntax

ArgumentRulesDescription
typeMandatory expire
operandMandatory the URI of the resource to expire
operatorOptional optional specification of expiry period

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.

© 2003-2005, 1060 Research Limited. 1060 registered trademark, NetKernel trademark of 1060 Research Limited.