Webplayer, Files and Cache

Hello everyone,

I am making an app that needs to download an .xml from a server. This file is used like a save file.

So I have a request like this:

new WWW("http://myfile.xml");
string data = www.text;

After that, I do some modification on my file and send it to an ASP MVC 3 site to store the file.

But sometimes, When I ask for my xml after that, I only have the old one, but the new is well saved. I think it’s a cache problem.

My questions are, is it possible to force a download, not to use the cache ?

I saw a partial answer that say to do a request like this :/>

WWW("http://myfile.xml?nocache="+randomnumber);

Is it true ?

Another solution could be to send the file to the server and saving it in the cache so I always have the good xml in the cache and in the server.

What do you think, do you have other solutions ?

Thanks a lot !

You have to wait for the WWW to finish. You can do that using a coroutine and (in c#) yield return www. Or you can check the isDone property.