clear OutputCache VaryByParam using code?

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?
 
L

Les Caudle

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top