I'm using URLRequest to pull XML data from a third party service. I'm looking to refresh this information at set periods. I noticed that URLRequest comes with an inbuilt ability to cache requests, but I'm wondering if there's a way to control how long the caches remain 'valid'. Essentially, I'd like to expire caches after a certain number of minutes. Obviously I can code this behaviour myself, but don't want to reinvent the wheel.
If I were to code my own cache invalidation code, would simply turning off caching before making the URLRequest suffice, or will I have to actively flush the cache, somehow?
When cacheResponse is set to
true, the AIR application uses the operating system's HTTP cache. The length in which data persists in the cache is up to the OS, and you cannot control it from AIR.