3 Replies Latest reply on Nov 12, 2009 1:28 AM by Arsohoh

    Urgent Help - Preventing Cache in Flex 3

    Arsohoh Level 1

      Hi all,

       


      Am new to this forum and i have a query which needs to be fixed urgently. Actually Flex 1.5 supports <cache> configuration variable in flex-config.xml which can be used to prevent client-side caching. But I suppose Flex 3 doesn't support the <cache> configuration variable, as am getting compilation error as 'unknown configuration variable compiler.cache' . Could any one please help me out with this? And also please suggest any ideas for preventing client-side caching. Also is there any other relative terms to <cache> configuration variable in Flex 3?

       


      I had referred the below url regarding the <cache> variable in Flex 1.5 , http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?co ntext=LiveDocs_Book_Parts&file=performance_118_13.html

       


      Thanks in Advance.

        • 1. Re: Urgent Help - Preventing Cache in Flex 3
          paul.williams Level 4

          It would be helpful if you could explain why you want to disable caching. There are various valid reasons for doing this, but your motivation may affect the approach you take.

           

          The <cache> parameter is related to the configuration of the web-tier compiler. I don't think you would ever disable this kind of caching on a live server, but you may disable it if you are running performance tests (which is the subject of the link you posted). I cannot find many references to this parameter, so it is either not widely used, no longer supported or poorly documented.

           

          If you are not using the web-tier compiler then a common approach is to add a query parameter to the url of the swf in your html wrapper. This could be a randomly generated value, a date / time value or a version number. See below for an example:

           

          http://www.newtriks.com/?p=134

          1 person found this helpful
          • 2. Re: Urgent Help - Preventing Cache in Flex 3
            Arsohoh Level 1

            Thanks a lot for the response.

             

            Actually i heard that using <cache> seems to be easy, where in  we could specify even the content-size to get cached (if we require) and also it just requires us to add something like <cache-mxml>false</cache-mxml> which will prevent the caching.

             

            And i have already tried appending the random number to the url. In the link provided by you, what does the swfObject refer to. I mean i couldn't find any reference to the object.

             

            Am trying like this,

             

            In index.template.html

             

             

             

            AC_FL_RunContent(

             

             

            "src", "${swf}?url="+Math.random(),"width", "${width}","height", "${height}","align", "middle",.........)

             

            Please guide me thru'.

             

            Thanks again

            • 3. Re: Urgent Help - Preventing Cache in Flex 3
              Arsohoh Level 1

              And also am not quite aware of what is web-tier compiler? Inconvenience regretted.