Re: OutputCacheSection



Thanks so much. This does the job. Mind if I ask for one thing further?...

What if I want all of my pages to remin uncached which are associated with a
specific MasterPage, but I want the <LINK>ed Style*** from that MasterPage
to be cached? Can I set Page Caching settings in a MasterPage or in the
MasterPage's CodeBehind? If so, how (if possible) can I override the general
"don't cache" setting so that the <LINK>ed CSS file can be cached?

Thanks much for your help!

Alex


"Peter Bromberg [C# MVP]" wrote:

Alex,
sorry about that. It should look like this (I tested it):

<system.web>
<caching>
<outputCache enableOutputCache="false"
enableFragmentCache="false"
sendCacheControlHeader="false"
omitVaryStar="false">
</outputCache>
</caching>

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net




"Alex Maghen" wrote:

Peter -

I've tried placing this block as I *think* you have it in your sample, which
is inside

web.config
<configuration>
<outputCache>
...
</outputCache>

<system.web>
...
</system.web>
</configuration>

But I'm getting an error: "Could not find schema information for the element
'outputCache'." Any idea why?

Thanks.

Alex



"Peter Bromberg [C# MVP]" wrote:

Example:

<?xml version="1.0"?>
<configuration>
<outputCache enableOutputCache="false"
enableFragmentCache="false"
sendCacheControlHeader="false"
omitVaryStar="false">
</outputCache>
<appSettings/>
<connectionStrings/>
<system.web>

HTH,
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net




"Alex Maghen" wrote:

Eliyahu -

Thanks. But I've been there already. What I'm confused about is that the
documentation says there's an "OutputCacheSECTION" portion in web.config (I
think different from the "OutputCache SETTINGS" section). Basically, I want
to try turning all page caching OFF in one centralized location in my
configuration, without having to touch eaqch of my pages, but I can't figure
out exactly where that should go and what the syntax should be.

Thanks.

Alex

"Eliyahu Goldin" wrote:

http://msdn2.microsoft.com/en-us/library/ms178606.aspx

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


"Alex Maghen" <AlexMaghen@xxxxxxxxxxxxxxxx> wrote in message
news:02274248-1B04-4FC4-A767-7A10EEC2BEEC@xxxxxxxxxxxxxxxx
I cannot figure out the exact syntax and placement for the
"OutputCacheSection" portion of web.config. Which sub-section does it go
in?
What are the exact properties and sub-tags which it supports? I can't find
a
description of how to use this in the web.config file instead of using it
programatically.

Help?

Thanks.

Alex



.