Cache Application Block or ASP.NET Default Cache Module

Topics: Caching Application Block , Enterprise Library Core, General discussion
Feb 19, 2008 at 6:31 AM
Hi All

What will you use mostly for the ASP.NET application for caching?

Cache Application Block or ASP.NET default cache module?

I heard someone said if we are building the Web application, it is better to use ASP.NET default cache module.

Is this true?
Feb 20, 2008 at 8:10 PM
Ent. Lib has some advantages and some disadvantages like every other tool / library.. therefore you cannot take this general statement for every case. Like everything else it depend on your case.
Feb 21, 2008 at 1:44 AM

Could you give me a general idea on when to use the Cache Application block and when to use ASP.Net Cache module?

Or any reference materials could study? Thanks.

Feb 25, 2008 at 11:06 PM
hi, i develop here on indeXus.Net Shared Cache which is something similar to Cache Application block. So I do not use application block at all so far and can't give you good advise about it since I do not have any experience with it, sorry. regards, roni
Feb 27, 2008 at 8:10 PM
We are using CAB and ASP caching at the same time. If you ask me, I would use CAB.
ASP.Net Caching Pros:
- Fast (Yes, it performs better)
- More proven than CAB.
- Built in to the system, every developer has it.

CAB Pros:
- Multi platform. Works on Web or Windows or any other context. No dependency on HTTP Context.
- Provides multi backing stores (Database, File, memory or on your own -eg. you can cache on Exchange server if you want :P )
- Source available
- Better extensibility and software design (which costs performance)
- Integrity to Instrumentation and WMI with performance counters
- Multiple caching stores

If you are building Web applications "only" then use ASP.Net caching. But if you write nightly tasks (tiny EXEs) that also uses the same caching architecture, I recommend CAB.
Also as you can see CAB has more features but slower. Do you need those features or source code?
My vote goes to CAB. These are my opinions.