Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Silverlight isolated storage treated as permanent, or as a cache?

How persistent is isolated storage - does Silverlight treat it like a cache, deleting items when it needs more space, or only when the user or application request it?

There also seems to be a wide variety of means to identify isolated storage - machine, application, domain, .... What I'm having trouble with is how these all relate to the user. Is it possible, and if so how, to create and later retrieve an isolated storage file with the following properties:

  • The same file is used, regardless of which Windows user is logged in
  • The same file is used, regardless of the assembly version (updates to the xap). Instead the url would remain constant. This would have to work even offline (out of browser).

Basically I want the isolated storage to persist across application updates, and over different users logging in.

like image 426
David Avatar asked Jul 17 '09 15:07

David


2 Answers

It is fairly permanent. The user could delete it if they really wanted too, but they would have to go out of their way to do so.

Here is the MSDN documentation for Isolated Storage.

IsolatedStorageFile in Silverlight a couple of statics that let you choose where you want to scope the storage:

  • GetUserStoreForApplication
  • GetUserStoreForSite
like image 129
ConsultUtah Avatar answered Oct 04 '22 01:10

ConsultUtah


The "MachineStore" options are not available in Silverlight, there are just "Application" and "Site". Both are scoped by the user..since the files are stored under the user's AppData on Windows. Apps in-browser and out-of-browser share the same Isolated Storage stores.

[edit..I missed part of your question the first time]: The Isolated Storage stores are not part of the browser cache, so they are not cleared when the browser cache is cleared. As a developer, you can delete things programmatically. As a user, you can use the Silverlight configuration UI (i.e. the right-click menu) to manage the stores - it's called "Application Storage" to the user. Finally, an intrepid user can locate the files on disk and delete them manually...they are hidden so they won't show up in a normal search, but a determined user can still find them.

like image 37
marktap Avatar answered Oct 04 '22 00:10

marktap