Topic: Forcing Dash to Clear Cache

Does anyone know what Flash Actionscript command I could use to force a Dash to clear its image cache?

What I am trying to do is build a widget to download a weather-related picture from a local website and then display it on a Sony Dash. This is working fine on my chumbys in terms of displaying a current image. However, when I looked at my Dash this morning (a Sunday), I noticed that the Dash was still showing Friday's image. When I rebooted the Dash, it correctly showed a current image. So it looks like the Dash is not ever timing out the stored image. If there a way to force it to clear the image cache?

Re: Forcing Dash to Clear Cache

I'm not aware of a, ActionScript command to do this, however, the most common technique to get around this is to use s "cache-buster" on the URL, so that it's different every time (the URL is the key used by the cache to reuse entries).

For instance:

url = ""+(new Date()).getTime();

Re: Forcing Dash to Clear Cache

Thanks Duane. I'll try than and see if it fixes the problem.

Re: Forcing Dash to Clear Cache

One other thing - if you know about how often the server actually changes its response, you can adjust the cache-buster to not always be different.  In the example above, the cache-buster is different every millisecond since that's was "getTime()" returns.  You can do an integer division to that number to make it change at whatever rate you want.

For instance, to make the cache work in 15-second chunks:

url = ""+Math.floor(new Date()).getTime()/15000);