2 Replies Latest reply on Aug 1, 2006 4:29 AM by chris.huston.t10

    HTTPService Cache

    chris.huston.t10 Level 3
      I am using HTTPService to load data from a MySQL database via PHP. But when the database is updated, the next HTTPService call returns the original data even though the database has been correctly updated. I am guessing that the data has been cached somewhere??? I am still fairly new to Flex, so any help would be greatly appreciated.

      Thanks,
      Vygo
        • 1. Re: HTTPService Cache
          slieb
          Was there ever a resolution to this problem? I'm seeing the same issue but in my case, using the HTTPService control to simply load static web text files. The text files get modified, the HTTPService gets re-invoked, but nothing changes.

          Can someone from Adobe respond please?
          • 2. Re: HTTPService Cache
            chris.huston.t10 Level 3
            Slieb,

            You will need to make set your server so that it does not cache the file. With PHP you can send this in the header function as in:
            <?php
            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);
            header('Pragma: no-cache');
            ?>

            But this won't work if you are using a simple text file. You might try the below code to prevent caching:
            var now:Date = new Date();
            textfile.url+="?"+String(now.getTime());

            Vygo