We've got a fairly standard e-commerce scenario with paged lists of products within categories. For better or worse, about 80% of visitors never navigate past the first page, depending on the category there may then be 5-10 more pages of results which are viewed far less often. (Yes we do optimise what appears on the first page and have good search - but that's a different discussion)
We can't cache every single page of results, because we're constrained by memory, but the benefit of caching just the first page of results for each category would be huge.
I know I could do something similar using object caching to store the datasets in question, but is this possible using output caching, perhaps by using the response.Cache object?
Where in the page lifecycle could this be done? Pre-render?
Much simplified, the URL is something like "/ProductList?Category=something&Page=1" And I'd want logic something like (pseudocode):
If paramater "Page" equals 1
Use output caching: vary by param = "categoryName; page"
else
Don't use caching at all, just render the page from scratch.
We're using ASP.NET 2.0, on IIS 6/win2003.