Best MVC views Caching Policy (OutputCache Policy) in large amount of data (views)

150 views Asked by At

I'm using DonuteCache (DonutOutputCache attribute which is better and more optimized than default MVC OutputCache attribute).I usually cache my views by one or more parameters so if the parameters was so vary I'd have lots of view to be cached.

In my case I have a product table which has about 300,000 rows and a view that is responsible to show product's specs by id . My problem is that in large amount of data it becomes so problematic to cache that data into memory, I calculated average size of single cached product view in memory, it's about 300 KB so 300 kb times 300,000 approximately equals to 9 GB. which is impossible to cache this amount of data into memory. we already have data cache but we'd like to have View cache as well

What do you think would be the best and most optimized strategy for caching this amount of views??I'm thinking of distributed cache policies (we also have it, we use NCache for caching our data (not views) )

thanks in advance

0

There are 0 answers