I was reading an article on Caching object in asp.net framework and I was looking on the class behavior. It has a HashMap like structure and looks like that I can actually instantiate a Hashmap and use it as collection.
What extra benefit does cache object bring over hashmap?
First off, I assume you mean a
System.Collections.Hashtablewhen you talk about HashMap.The difference between cache object and a simple Hashtable is that it provides you additional services. For instance, you can set object expiration rules on the Cache object. Also, you can define the size quota of the cache. Hence, you may say that no more than 100MB are cached. It’s not so easy to implement using simple hashtables.
To find out more about Asp.Net caching, it might be worth checking out this article: http://msdn.microsoft.com/en-us/library/ms998549.aspx#scalenetchapt06_topic14