browser caching module xap

Topics: Prism v4 - Silverlight 4
Jan 7, 2011 at 7:52 AM

I have an issue where the browser keeps caching the xap files.

I've fixed this for the Shell by introducing a querystring parameter using the code in

but my modules are loaded by prism: http://someurl/ClientBin/ReportModule.xap

the browser caches it correctly, it just doesn't seem to detect the changes if the module is updated. 

is there a way to let prism use the same trick for loading the latest module.xap?


Jan 7, 2011 at 5:03 PM
Edited Jan 7, 2011 at 5:04 PM


When you load modules remotely, the XapModuleTypeLoader or MefXapModuleTypeLoader is used to retrieve the module from the remote location. You could try inserting the date or any extra identifier inside a query string parameter in the uri variable inside the LoadModuleType method of the Xap module type loader you're using. In order to achieve that you could modify the source code of Prism, or extend it by creating a custom Xap module type loader that implements this behavior.

You might also find the Deployment chapter of the Prism MSDN documentation useful.

I hope you find this helpful.

Guido Leandro Maliandi