RE: [users@httpd] weird caching problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A HTTP response is cacheable if it contains a cache validator (ETag, Last-Modified) or an Expires header (or both), provided neither the response or the request that elicited it contain a Cache-Control header explicitely forbidding caching. If the response is cached, it must contain one of the above mentioned headers.
 
If you cannot figure out why the response is cached, and if "Cache-Control: no-cache" is not an option (note that "Cache-Control: no-cache" does not prevent caching - it only forces revalidation each time it is served from cache), you may try to set an explicit expiration date in the past. That way the response would be stale and the cache would be unable to serve it without revalidation with the origin server.

Even with this "trick" the cache may be tempted to serve the stale response (for example if there is a max-stale directive in the Cache-Control header). You can discourage it by including "Cache-Control: must-revalidate".

I really don't see why your customer does not want the responses to contain a no-cache directive, though.
 
-ascs

________________________________

From: Antoine Prevosto [mailto:antoine.prevosto@xxxxxxxxx] 
Sent: Sunday, April 09, 2006 1:14 PM
To: users@xxxxxxxxxxxxxxxx
Subject: Re: [users@httpd] weird caching problem


Hi,

I guess that if the app (or anything else) doesn't send a no-cache header, or a max-age header, or a session cookie, the .jsp page will be served by the client browser cache, and will not be even received by the HTTP Server. 

Rgds
Antoine.


2006/3/28, Sean Carey <sean.carey@xxxxxxxxx>: 

	Here We Go:
	
	I am using apache 2.2 , mod_jk 1.2.15, Tomcat 5.5. The application
	that I am working on basically has 1 filename.
	
	s.jsp
	
	but.....
	
	There are tons of parameters that are used on the file to make it 
	dynamic. The problem I am having is that the apache server or mod_jk
	thinks its the same request, so I get major cache problem that cause
	the page to be skewed.
	
	If I add response header no-cache and restart the app it works fine. 
	The company that I am consulting does not want to use a no-cache
	response header. So I am wondering if there is a way in apache to make
	sure I am properly getting s.jsp through mod_jk. Any help would be
	appreciated. 
	
	Sean
	
	---------------------------------------------------------------------
	The official User-To-User support forum of the Apache HTTP Server Project.
	See <URL: http://httpd.apache.org/userslist.html <http://httpd.apache.org/userslist.html> > for more info.
	To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
	   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
	For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
	
	



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux