I want to be able to cache a few objects without referencing System.Web. I want sliding expiration and little more... Is there really no where to go but to build my own using a Dictionary and some selfmade expiration of objects - or are there something in the .NET framework I've totally missed out on?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
You could try the Microsoft Enterprise Library Caching Application Block.
Example utility function for caching on demand with a sliding timeout:
You can specify multiple expiration policies, including
SlidingTime
,FileDependency
,ExtendedFormatTime
, or you can write your own.Have you looked at: Domain Objects Caching Pattern for .NET