xxf:cache, on the
<xf:submission>elements. This attribute can be used with instances that are read-only or read-write. When set to true:
PUTmethod, by the body of the request sent.
xxf:readonlyattribute is set to true (on
<xf:submission>), a single copy of the instance is used in memory. Otherwise, a read-write copy is made.
xxf:cache="true"is equivalent to using
xxf:cache="false"is equivalent to using
<xf:submission>, the submission has to use
PUTare not meant to be idempotent methods, you should use
xxf:cache="true"with these methods carefully, typically for calls to services you know are idempotent. Otherwise, incorrect or stale data might be returned by the submission.
xxforms-instance-invalidateevent to it. The next time an XForms document requires this instance, it will not be found in the cache and therefore reloaded. Example:
xxf:invalidate-instanceaction allows invalidating a shared instance by resource URI, for example:
xincludeattribute, which if present will only invalidate the instance with the given resource if it was loaded with a matching
xincludeattribute is not specified, any shared instance matching the resource URI is invalidated.
xxf:invalidate-instancesaction, for example:
xxf:ttl attributecan be used to set a time to live for the instance in cache. This duration is expressed in milliseconds and has to be greater than zero. When a shared instance if found in cache but has an associated time to live, if it was put in the cache more than time to live milliseconds in the past, then the instance is discarded from the cache and retrieved again by URI as if it had not been found in cache at all. The following example expires the shared instance after one hour:
xxf:cache="true", be sure that the data contained in the instance does not contain information that could be inadvertently shared with other XForms documents. It is recommended to use it to load localized resources or similar types of data.