Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've set up a caching on a sharepoint site. But have one specific page that should never be cached. How to disable caching for a specific publishing page on a sharepoint site? Or how to flush cache of the page programmatically?

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

There are various ways:

// Stop Caching in IE
Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);
// Stop Caching in Firefox
Response.Cache.SetNoStore();

or you could use the @Output property:

http://msdn.microsoft.com/en-us/library/ms178606(VS.80).aspx http://msdn.microsoft.com/en-us/library/hdxfb6cy(v=vs.80).aspx

Here you can find all the instruction: http://support.microsoft.com/kb/323290

share|improve this answer
add comment

Create a WebPart which calls PublishingHttpModule.DontEnableCachingForRequest and insert that on the page.

share|improve this answer
add comment

Although the answer is already posted I want to say that in my case the problem was with Content Query Web Part caching. And to disable it I set UseCache attribute to False using SPD.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.