clear OutputCache VaryByParam using code?

  • Thread starter Thread starter Les Caudle
  • Start date Start date
L

Les Caudle

When displaying a database driven product page, I cache the page using:

<%@ OutputCache Duration="86400" VaryByParam="ProductID" %>

which works fine UNLESS I change the pricing or description for that page in the
database.

Then, I need to clear the cache (either for that specific productID- or for the
aspx page and all the ProductID's it displays).

How can I clear the cache under program control?
 
Yes, I realize that - but that is not a good solution.

As the data on the page is tied to a database, I need a way to automatically
clear this cache when the database has changed.

By automatically, I mean using code, not modifying a page by hand in an editor -
or even changing the timestamp on the file (which requires certain permissions)

Somewhere inside of .NET, this cache lives - and there must be a way to clear
it..

Regards, Les Caudle
 
Back
Top