473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

RE: Cache-control and Expires headers

I am having the exact same problem. I am using VS2008 (.Net 3.5) and I
can't set the Expires date out any further than one day.

Doing a little reflection, I see that in the HttpCachePolicy class,
SetExpires() method, if the expires is already set, it will only change
if the new expiration date is less than the existing one.

I have removed all of my custom HttpModules and discovered that none of
mine are setting the expiration.

Somwhere in the pipeline, something built in is pre-setting the
expiration date to one day forward from the request.

I experience the same effect whether I use Response.Cache.SetExpires(),
Response.Expires, or Response.ExpiresAbsolute.
Sometimes the greatest solutions come from the simplest logic.
Being told "No" is merely the incentive to do it anyway.

*** Sent via Developersdex http://www.developersdex.com ***
Jun 27 '08 #1
2 2244
Thanks for your inputs.

I've also forwarded this question to some other ASPNET dev engineers. I'll
post here is if there is any further information about this issue.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>Subject: RE: Cache-control and Expires headers
>Newsgroups: microsoft.public.dotnet.framework.aspnet
Date: Wed, 07 May 2008 07:08:20 -0700
>I am having the exact same problem. I am using VS2008 (.Net 3.5) and I
can't set the Expires date out any further than one day.

Doing a little reflection, I see that in the HttpCachePolicy class,
SetExpires() method, if the expires is already set, it will only change
if the new expiration date is less than the existing one.

I have removed all of my custom HttpModules and discovered that none of
mine are setting the expiration.

Somwhere in the pipeline, something built in is pre-setting the
expiration date to one day forward from the request.

I experience the same effect whether I use Response.Cache.SetExpires(),
Response.Expires, or Response.ExpiresAbsolute.
Sometimes the greatest solutions come from the simplest logic.
Being told "No" is merely the incentive to do it anyway.

*** Sent via Developersdex http://www.developersdex.com ***
Jun 27 '08 #2
Hi Mike & WALDO,

After some further discussion with some other engineers, they said that the
one 1 day fixed expire value is not the exact behavior and the actual code
logic is a bit different from that. For the problem you encounter, it might
be a specific issue. Due to the support limitation in newsgroup, it is a
bit hard for me to further involve them. If this is an important issue, I
would suggest you consider contacting CSS for further troubleshooting:

Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: st*****@online.microsoft.com (Steven Cheng [MSFT])
Organization: Microsoft
Date: Fri, 09 May 2008 06:16:47 GMT
Subject: RE: Cache-control and Expires headers
>
Thanks for your inputs.

I've also forwarded this question to some other ASPNET dev engineers. I'll
post here is if there is any further information about this issue.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

================================================= =
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ault.aspx#noti
f
>ications.

================================================= =
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>>Subject: RE: Cache-control and Expires headers
>>Newsgroups: microsoft.public.dotnet.framework.aspnet
Date: Wed, 07 May 2008 07:08:20 -0700
>>I am having the exact same problem. I am using VS2008 (.Net 3.5) and I
can't set the Expires date out any further than one day.

Doing a little reflection, I see that in the HttpCachePolicy class,
SetExpires() method, if the expires is already set, it will only change
if the new expiration date is less than the existing one.

I have removed all of my custom HttpModules and discovered that none of
mine are setting the expiration.

Somwhere in the pipeline, something built in is pre-setting the
expiration date to one day forward from the request.

I experience the same effect whether I use Response.Cache.SetExpires(),
Response.Expires, or Response.ExpiresAbsolute.
Sometimes the greatest solutions come from the simplest logic.
Being told "No" is merely the incentive to do it anyway.

*** Sent via Developersdex http://www.developersdex.com ***

Jun 27 '08 #3

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

Similar topics

1
by: Glenn | last post by:
Hi, I have a config XML file that I am using from the application cache. I have configured the entry with a remove callback to re-populate cache automatically when the XML file changes. All is...
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...
6
by: Charts | last post by:
I used HttpContext.Current.Cache To cache data from database. The code is like that. public static DataView GetCategories() { if ( HttpContext.Current.Cache == null ) {...
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...
2
by: Don | last post by:
I've come across a weird behaviour with regards to the cache object. I couldn't find any documentation which could explain this. Basically the problem has to do with the cache item NOT expiring....
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...
0
by: Hypnotik | last post by:
My program is to simulate cache memory. I read in the info from 2 external files, 1) access 2) data in memory. When I read the information in I display the info...and it is all correct. However...
2
by: =?Utf-8?B?Y2F0?= | last post by:
We recently moved an older ASP.NET 1.1 code base on to ASP.NET 2.0, .NET 3.0 and Windows 2003 Server SP2. We started experiencing the following issue with the web cache (the code is straightforward...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...

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.