Build Your Own ASP.NET Cache with WeakReferences

added by DotNetKicks
2/1/2017 3:55:56 PM

1 Kicks, 232 Views

Practical .NET You want to keep an object around only as long as you have memory available, do ya? Then you need the WeakReference class. I very much like the ASP.NET Cache and the more generally usable MemoryCache collections: They let me build up a set of objects (typically drawn from a database) that I can use in my application.


0 comments