Andrew Stevenson's WebLog

Write Here Write Now

Syndication

.Net Languages

ADO.Net

Asp.Net (Misc.)

Asp.Net Controls

Bad Patterns

Err What?

Files and Folders

Forums

IE Add-Ins

Methods for the Madness

Performance

See Clearer, C#

Test Driven

April 2005 - Posts

Whats the deal with HttpCachePolicy.SetCacheability()???

I've got this project where the default cacheability is "Server".

I've got a couple pages which, for obscure reasons, must be cacheable on the client's browser.

In these pages, I explicitly call : Response.Cache.SetCacheability(HttpCacheability.Public) but it doesn't work. A couple hours of digging later and I know why.

I can't find any mention of this behavior in the documentation, so I am wondering why you cannot change the cachability to a value greater than the current setting and why there is no indication at runtime that it cannot work.

 

I really need to be more clear when I write these things. 
I recieved an offer for help on this (thanks Scott) but when I wrote the posting, I had already changed the app's default to ServerAndPrivate, so I was wondering about the design decision, not about how to work around it.

Posted Wednesday, April 06, 2005 11:39 AM by AndrewSeven | 1 comment(s)

More Posts