This content has been marked as final. Show 8 replies
You could try to add a random value to the GET parameter if possible...
something like pkg_xml.get_xml?id=123&proxybypass=<somerandomvalue>
If you get new values with the above random value, then there is a cache somewhere in place...
Thanks, Ries. I had just read this elsewhere and have updated it for one of my data calls. It seems to be working!
It feels like a hack but clearly other Flex developers are doing the same.
One question I have about your response...I had changed the "method" on the HTTPService calls to "POST" as I read that it might actually fix this issue (which it did not).
Since these are particular service calls are strictly to fetch HTP.P data, should I revert these back to "GET"?
This sound like a caching issue 'somewhere' but my initial guess is that the browser does cache this data (which makes sense actually...) And you can fool the browsers cache by adding that get parameter with some random value.
You can check this in FireFox with the extension 'Life HTTP headers' and see what headers are send...
If your service allows this and it IS the browser that caches the data (see above for checking), then you need to instruct your server to send along the following headers.
- Set Last-Modified to some date in the feature (make sure it's a valid date).
- Set Cache-Control to "no-cache, must-revalidate
- Set Pragma to no-cache
- Set Expires to some valid date in the past
They above I did for PHP pages, so you properly have other parameters you need to enter 'somewhere' in your service. This is just to tell the browser not to cache the content. Do realise that this is a bit of a gray area, some browsers give priority to some parameters then other browsers. Just trying to push you into the right direction...
To anwer your last question about POST, yes this should have solved it so caching might be in a other area, or might be buggy somewhere...
On the POST / GET issue, be aware that Flex converts a POST to a GET if the POST body is empty. This is a well known behavior.
This may explain the lack of effect in the caching problem.
All I know for sure is that I have always used POST, never with an empty body, and have never had a cache problem.
Ntsii and Ries,
Are you all using any sort of Adobe or other data services platform for Flex?
ntsiii, interesting comment!! Sounds odd though... and indeed explains the behavior...
@Chris: I am using both Blaze-DS and WebORB.
WebORB mostly for clients and Blaze-DS for the fun of it.
Have you tried using a bound array collection.
It sounds more like binding issues.