This content has been marked as final. Show 3 replies
It sounds like a cache problem. There are a couple of things you can do to prevent caching. One is to append a unique value to your HTTPRequest, something like the current time or a random number.
url="yourserver.php?unique=" + String(Date.parse(new Date()));
A second thing you can do is to tell your php script not to cache the value. I use the following:
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', FALSE);
I use both of these solutions together, though probably just the first solution will work.
thank you for your answer. Unfurtunatly it is not a cache problem. I tried the unique thing, which sounds very meaningful. But the ArrayCollection still gets not refreshed, or reloaded. When I use the PHP Script on its own, it always shows the current content, using no cache at all. So I know the right content gets passed to the flex app, but the app does not use it!
Any other suggestions, maybe there is a cache problem in flex?
I just took a look in the older app where I used an XMLListCollection to fill the dataprovider.
There the command to gill the XMLListCollection was "HTTPRequest_ID. lastResult.XML_node". Now I fill the ArrayCollection only with "content = event. result.allEntries.entry;". I can not use lastResult at this point. Might this be a problem? I an't believe there is no way to fill an ArrayCollection at runtime more than one time?!
after testing over two hours, I finally tried out your way. And it really works. But I really can't believe that this is the only way to go. Anyway, thanks for your help.