8

I am creating a website on ASP.NET 4.0. I am unsure whether to use the old ASP.NET Cache class or the MemoryCache class introduced with .NET 4.0. All I can find are reasons to use MemoryCache for non-web applications, but no pros or cons when programming websites (where I obviously can use both classes).

1 Answer 1

3

I am personally a bit more thrilled about MemoryCache, as it is more flexible. But, you don't have to make a firm decision today if you abstract this out a bit so you can change implementations.

The beauty here is somone has already done the work for you here.

Sign up to request clarification or add additional context in comments.

1 Comment

As an aside, I am currently working on caching implementation for a large retailer. The implementation uses both AppFabric and MemoryCache and the normal consumer is a web application (although there are windows clients, as well). I implemented something similar to the project mentioned, but the abstraction is a bit different, due to needs of the environment. This does not mean I am advocating you accept my expertise, just stating I have done work in this area.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.