How can I detach the object reference on MemoryCache

前端 未结 5 573
轮回少年
轮回少年 2021-01-04 03:26

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 ca

5条回答
  •  既然无缘
    2021-01-04 04:17

    Why not just store as json or a string? These are not passed by reference and when you get out of the cache you will get a new copy :) I am here to be challenged as thats what I am doing atm!

提交回复
热议问题