How can I detach the object reference on MemoryCache
问题 I'm currently trying out the new MemoryCache in .Net 4 to cache a few bits of data in one of our apps. The trouble I have is the objects are updated and the cache appears to be persisting the changes e.g. public IEnumerable<SomeObject> GetFromDatabase(){ const string _cacheKeyGetDisplayTree = "SomeKey"; ObjectCache _cache = MemoryCache.Default; var objectInCache = _cache.Get(_cacheKeyGetDisplayTree) as IEnumerable<SomeObject>; if (objectInCache != null) return objectInCache.ToList(); // Do