What is difference between .NET framework 4.0 MemoryCache
vs ObjectCache
?
Where to use which object?
ObjectCache
is an abstract class, you can't 'use' it per se. As Dash says in his comment, it's designed to show how a cache should be built and what operations it supports. MemoryCache
is an implementation of ObjectCache
and from your question is likely what you should use. However, because ObjectCache
is abstract, you could just as easily write your own FileCache
inheriting from ObjectCache
and it would be perfectly valid.