asp.net caching by ref issue

59 Views Asked by At

I am working with C# and using the asp.net in proc caching framework to cache my large objects. So, I place the object in to .net caching, and look for it in multiple places in my code. After I retrieve the object from cache, I modify it eg. alter properties of the object etc. It seems though, the object is stored in the .net caching by ref as oppose to by value. So if I update the object that has been pulled from cache, it also updates the object within the cache.

Is there any way to avoid this happening - I dont want whats within cache to be reflected by the change.

0

There are 0 best solutions below