I have downloaded the patterns & practices Silverlight Integration Pack to use caching (Caching Application Block) in my Silverlight Application, but i tried and tried and didn't get it to work. I did not find any useful example - does anyone have an example? Just a few lines of code that are showing a simple usage? Do I need to use unity?
THANKS!
I used a default configuration that i got from the Enterprise Library Configuration - Tool which i exported as XAML:
<el:CachingSettings DefaultCache="In-Memory Cache" x:Key="cachingSilverlightConfiguration">
<el:CachingSettings.Caches>
<el:InMemoryCacheData ExpirationPollingInterval="00:02:00" Name="In-Memory Cache" />
</el:CachingSettings.Caches>
</el:CachingSettings>
And when I try to access it with the following code:
ObjectCache cache = EnterpriseLibraryContainer.Current.GetInstance<ObjectCache>("In-Memory Cache");
then, i get an Exception:
{System.IO.FileNotFoundException: The system cannot find the file specified. File name: 'System.Xml.Linq, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' ...