Confused with Output cache set programmatically

S

SharpSmith

hi
i have a strange problem with OutPut cache working fine on development
box and not working on production server
background : @outputCahce directive is fine, but wanted to make
centralized output cache , so i have some setting section in web config
defining what page and how to cache
and in my Base Page i having following :
<code>
Response.Cache.VaryByParams["*"] = true; //will vary by all params
DateTime expires = DateTime.Now.AddSeconds(duration );
Response.Cache.SetExpires(expires ); // will valid for duration in
seconds from now
Response.Cache.SetValidUntilExpires(true); // will not update cache by
client header ( ignore Ctrl+f5)
Response.Cache.SetCacheability(HttpCacheability.ServerAndPrivate ); //
whould be cached both by browser and at server
</code>

The problem is that on local machine it works fine: you load page, hit
f5 or Ctrl+F5, and you see the server-cached version
on server it other : you see that browser do caching , but F5 will
bring you fresh, not-cached by server page

used time-span printed with response.write on test pages
and i sure that caching block is working, i write to log to ensure that
some page added to cache

done with ASP.Net 1.1 running IIS5 on dev and IIS6 on production
Web has many resources on output caching but i not found any solution
for this

Any ideas guys ?

Thanks Much
EV
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top