1
votes

I'm building a web application in asp.net mvc 3 and SQL Server 2008 R2. The website is all about showcasing 1000s of products and each product has a dedicated web page. Each product page HTML is generated with the data from corresponding row of product table. When a row of product table is updated, I would like to invalidate the product web page alone.

I'm planning to use OutputCache feature of ASP.NET. Here are two question

  1. Does outputcache suits my caching requirement or is there any better cache mechanism?
  2. What is the best strategy for invalidating the cache of single page when underlying table data changes?
1

1 Answers

0
votes

OutputCacheAttribute has an SqlDependency property.

A value that identifies a set of database-name and table-name pairs that the action's output cache depends on.

More info in this article.