Looking at a caching implementation for some common search data in an asp.net web application.
In the past, I created a singleton that creates a bunch of hash tables that have public accessors. This works very well for read-only data that never changes.
I looked at System.Web.Caching a bit, but it does not seem to offer any advantages over the single-user approach. We do not use SQLServer, so we will not be able to use SQLCacheDependency for rare cases when data may change.
Anyone have experience with any of these alternatives? Or is there a better deal?
System.Web.Caching , . , / .
, - ( ). , . , . Cache LRU.
, , , .
System.Web.Caching, , , , , . singleton InvalidateCache() , .
- asp.net, , , winforms, System.Web.Caching.
Business Object , NameValueListBase < TKey, TValue > . . , System.Collections.Generic.Dictionary.
-, , CSLA.Net - Expert # 2008. , VB.Net.
I have experience with both. I prefer a singleton pattern for the following reasons: