1

I have a custom object that I'm caching with AppFabric, and I changed a property name and failed to resolve that property's value with the new name. (How does AppFabric handle custom objects behind the scenes? Serialize to XML? Byte array?)

Is there some kind of internal versioning implementation that I can use, or do I need to write a validation method for the returned cached items?

(I'm fairly new to AppFabric, and no one seems to know much about it at my work. But's an approved technology that we can use.)

Cameron
  • 2,574
  • 22
  • 37
  • Can't you just clear the cache after a new deployment? – usr Oct 14 '14 at 16:03
  • @usr I'm ultimately trying to remove the "human" element from this scenario. Both that and my initial thought of hardcoding a version number that requires incrementing (which I **DO NOT** want to do) require someone to remember to do an additional step in deployment. – Cameron Oct 14 '14 at 16:09
  • Good point. Consider storing the last app version in the cache and on app startup you clear the cache if it does not match. You can use the timestamp of the main dll for example. Or its hash. It is probably a very fragile deployment story if you rely on deserialization compatibility. You might end up having wrong data without noticing. – usr Oct 14 '14 at 16:28

0 Answers0