Expand my Community achievements bar.

How to clear cache

Avatar

Level 1
I am generating an XML file dynamically using php, and have
flex call and use it as a dataprovider. However I have been unable
to make flex display the updated data, it just continues displaying
the data that was first genereated in the XML file. I have tried
numerous different methods of clearing the cache but none of them
had and effect whatsover.



Could someone please help me by telling me pricesly what i
need to do to have flex reload the data from the xml file whenever
the page loads.



Thanks in Advance

Oran
2 Replies

Avatar

Level 1
I have this exact same problem and I'm searching for a
solution too.

Avatar

Level 1
Very quick response as im very busy, hope this helps.



<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"

width="100%" height="100%" creationComplete="srv.send()">

// to automatically refresh the page on creation complete, or
...



<mx:Button label="Refresh Page" click="srv.send()"/>

//... to do it on a button click



<mx:Script>

<![CDATA[

import mx.collections.ArrayCollection;

[Bindable]

public var myData:ArrayCollection;

]]>

</mx:Script>



<mx:HTTPService id="srv" url="../data/data.xml"/>



//then reference this data source with



<mx:ColumnChart id="chart"

dataProvider="{srv.lastResult.data.result}"

etc.