2 Commits
Author SHA1 Message Date
Dmitry Kalyanov d933418d23 Fix data race in System.Web.Caching by using appropriate lock level
System.Web.Caching.CacheItemLRU.this[string].get modifies LRU list so it
must be called under write lock. Cache.GetKeyLastChange violates this
constraint by acquiring only a read lock.

Fixes #12218
2018-12-31 15:36:36 -05:00
Marek Habersack 3b8cd7bbce [asp.net] New version of code to purge underused entries from the cache.
This version uses an LRU cache to hold the cache items. Priority is not taken into account
when removing the underused entries (with the exception of the CacheItemPriority.NotRemovable
- items with this priority are never purged), they are treated equally.
A separate thread is not used to perform purging, instead the collection happens in the current
requests's thread.
Minor improvements to cache item enumerator and to the CheckDependencies method.
2010-11-16 04:03:26 +01:00