Search code examples
c#appfabric

Appfabric GetObjectsByTag deserialize issue


I'm using DataCache.GetObjectsByTag to extract dependencies before removing the cache item. My web app adds items to cache, and the win service can remove items from cache. Win service doesn't have binary reference to the objects that are saved in the cache.

When win service tries to remove cache object I get

'System.IO.FileNotFoundException: Could not load file or assembly 'Web.Services.Contracts'.

It I add 'Web.Services.Contracts' to win service, it works without errors.

Does this mean DataCache.GetObjectsByTag deserialize each object?

Appreciate your help. APL


Solution

  • Of course DataCache.GetObjectsByTag, will get download all cached objects in your client. It's like DataCache.Get or DataCache.GetItem but for regions.

    The DataCacheItem objects are stored in the cache cluster in a serialized form. If a client needs to get an item from cache, then the assemblies associated with those serialized objects must also be referenced by the client.