I'm creating a cache class that utilises .NET's dictionary (class Cache<K, V> : Dictionary<K, V>
) which only holds a number of classes in the dictionary at any one time. When new items are added old ones are deleted if the cache gets too big.
I have done Add, Remove and Clear but would like the cache to update an item such that the cache knows it's not that old any more if someone uses the dictionary's array lookup []
to change the class the key points to.
Is it event possible?