I'd done all the usual stuff of setting the meta tag expires and no-cache stuff in the html but turned out that the the proxy server was caching the file that was being requested as the source of the instance. Strangely - even when we posted back modified instance data it would only push the cached version.
Solved this by creating a service that served the source dependant on the url passed to it - and *most importantly* adding a random junk parameter to the url just to throw the proxy server from caching it. Also setting the action of the submission to have another junk random parameter.
solved
I'd done all the usual stuff of setting the meta tag expires and no-cache stuff in the html but turned out that the the proxy server was caching the file that was being requested as the source of the instance. Strangely - even when we posted back modified instance data it would only push the cached version.
Solved this by creating a service that served the source dependant on the url passed to it - and *most importantly* adding a random junk parameter to the url just to throw the proxy server from caching it. Also setting the action of the submission to have another junk random parameter.
Preventing servers from caching data when the URL is unchanged
We had the same problem when using the REST interfaces of eXist and OpenWFE. We just added the current time to the end of the base URL.
The following example shows how to use the extensions to submission to obtain a session ID from OpenWFE:
<xf:submission id="sub-get-sessionid-login" action="http://ignore" method="get" ref="instance('inst-get-sessionid')/ANodeThatDoesNotExist" replace="instance" instance="inst-get-sessionid" > <xf:extension> <sub xmlns=""> <action> <part value="'http://localhost:5080/worklist?'" /> <part value="concat('time=', now()" /> </action> <headers> <header name="Authorization" value="..." /> </headers> </sub> </xf:extension> <xf:action ev:event="xforms-submit-done"> <xf:setvalue bind="bnd-login-state" value="'logged-in'" /> </xf:action> <xf:action ev:event="xforms-submit-error"> <xf:message level="modal">Login failed.</xf:message> </xf:action> </xf:submission>Note that these extensions are now superceded by recent additions to XForms 1.1 and will be replaced. (For the status of this change see issue 502.)