473,473 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

set cache-control tp private to public

should cache-control be set to public or private on dynamic site. our
content doesnt change for 24hrs, but because results from search pages vary
so much, we cant cache the pages themselves.

what other header info should i explicetly setting in the asp.net page to
make sure that the site is cached as much as possible?

Show Headers from http://www.mls.ca

Request headers sent:

HEAD / HTTP/1.0
Host: www.mls.ca
Referer: http://www.web-caching.com/
User-Agent: ReadHeaders/0.01 (www.web-caching.com)
Accept: */*
Received redirect headers:

HTTP/1.0 302 Moved Temporarily
Server: Microsoft-IIS/5.0
Date: Thu, 19 Feb 2004 21:33:52 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Location: /map.aspx
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 126
X-Cache: MISS from www.mls.ca
Connection: close
Nov 18 '05 #1
4 6252
Hi sviau,
Thanks for posting in the community!
From your description, you have an ASP.NET site which will generate dynamic
pages to users such as a search system. And since the Search result are
contant, so you'd like to cache them,yes?
If there is anything I misunderstood, please feel free to let me know.

Based on my experience, for your situation that those page are dynamically
generated via the user's input or some certain params,yes? There are two
means you can take:
1. Using the serverside outputcache provided by the ASP.NET
The ASP.NET's output cache can cache a certain page's certain version on
the serveside's memory, the version can be determined via different ways,
for example, querystring, time period, or event custom controling it. Thus,
when the ASP.NET detect that a certain version of the same request is
cached before, it'll directly returned the reponse retrieved from server's
cache rather than generated it again. I'm sure this is very wonderful for
some search system which need to cache pages for different search
querystrings, do you think so? And here are some tech reference on ASP.NET
outputcache, you may have a view to see whether it helps you.

#Caching ASP.NET Pages
http://msdn.microsoft.com/library/en...utputcache.asp
?frame=true

#Caching Multiple Versions of a Page
http://msdn.microsoft.com/library/en...ingmultiplever
sionsofpageorcontroloutput.asp?frame=true

2. Using the user's client browser's cache ability.
In addition to ASP.NET's page cache ability, generally the client browser
will also cache a certain page on the clientside, we can set the http
header of the response. And here are also some tech articles on this:

#How to Modify the Cache-Control HTTP Header When You Use IIS
http://support.microsoft.com/default...b;en-us;247404

#Client-Side Page Cache
http://developer.apple.com/documenta...ations/Backtra
ckingAndCache/chapter_6_section_2.html

#HTTP Caching in Mozilla
http://www.mozilla.org/projects/netl...ching-faq.html

Please check out the above suggestions to see whether they help.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #2


yes im familiar with asp.net cahcing, and client cahcing; but the
question is:
is Cache-Control: private setting correct in the header? or should it be
set to public? what does this affect?

thanks
stephane

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3
Hi Stephane,

Thanks for your followup. As for the Cache-Control header you, it can be
set in ASP or ASP.NET via
Response.CacheControl = (Public | Private | no-cache) .
The difference between private and public is that if set as private, the
cache will only speicfy to only the client , if "public" not only the
client, the other proxys are also able to cache this response. So as for
your situation, the private (by default) is enought. And here is the
detailed reference in MSDN:

#Response.CacheControl
http://msdn.microsoft.com/library/en...sopcc.asp?fram
e=true

Also, here is the HTTP/1.1 Cache-Control directive reference:
#HTTP/1.1 Cache Control
http://www.eurecom.fr/~ross/CacheTutorial/tsld067.htm

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #4
Hi Stephane,

Have you checked out the items in my last message? If you have any further
questions, please feel free to post here.
Thanks.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jim | last post by:
Hi, I have a few questions regarding the cache object: Does the cache object exist through postbacks? The cache object only exists for the current request, right? Is there a way to cache...
3
by: martin | last post by:
Hi, I am storing a dataset in cache, which is happening fine. I can easily retrive it at postback from the cache, cast it to a dataset and reuse it. However I have specified that the cache...
4
by: Mat | last post by:
Hi, I've stumbled onto a problem when using the caching object in ASP.Net. I'm placing a static dataset to the cache as the data only changes once a day. Whilst writing to the cache I'm using...
2
by: Harry Simpson | last post by:
If anyone can chime in on these questions, I'd sure appreciate it. 1. How does the cache block fit in with the UIP Block - Is the "state" managed there handled any differently with the CAB...
1
by: William Sullivan | last post by:
I'm trying to nail down some issues with the cache in my application. Currently, I have an object that stands between my business logic and database logic called CacheLogic (cute, no?). ...
13
by: Andrew Morton | last post by:
I am caching some data in VB.NET using System.Web.Caching, is it possible to lock the cache so that other sessions attempting to access the same cache wait when it is being updated? I have the...
26
by: Ed L. | last post by:
Here's some of my current notions on pgsql performance tuning strictly as it relates to pgsql tuning parameters in the context of a dedicated linux or hpux server. I'm particularly focusing on...
0
by: mateipuiu | last post by:
When a try to run a client build on 2005, which uses the Microsoft.ApplicationBlocks.Cache.dll reference, when using a Microsoft.ApplicationBlocks.Cache.dll created on Debug mode, the client works...
0
by: =?Utf-8?B?YmlqYXk=?= | last post by:
The type initializer for 'Microsoft.ApplicationBlocks.Cache.CacheService' threw an exception. We migrated our windows application from 1.1 to 2.0. The debug and Release mode of the application...
2
by: Peter | last post by:
Hi The documentation for System.Web.Caching.Cache states that it is "thread safe". Does this mean that if I access System.Web.Caching.Cache from several places in my application access to the...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.