1 Reply Latest reply on Jun 30, 2010 1:52 AM by Matt Le Fevre

    Adobe Flex with xml creates cache problems....Need help

    amal.k

      Hi,

       

      I have created a qoute calculator in flex and the data's are pulled from an xml file, but when I upload these to server and when new xml file with new data is uploaded the application is showing with same old data.

       

      Every time I have to change the xml and have to run the application one again to get new updated data.Following way I am connecting the xml file.

       

      I have read in many places that by giving random time function will clear this cache so I tried and even that also not working for me.

       

      Please, looking for an urgent help .

       

      ..................Code.................................

       

      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete=" initComponent()"  layout="absolute" width="640" height="516" backgroundColor="#FFFFFF"  >


      private function initComponent():void
                  {   
                       var url:String = "data.xml?blabla="+new Date().milliseconds+";";
                      var d:Date = new Date();
                     xmlURL = url + "?" + Math.random();
                     items.source=xmlURL;
                             
                  }


      <mx:XML id="items" source="data.xml" />


      <mx:HTTPService id="xmlDataList" url="{xmlURL}" />