[squid-users] HttpRequestHeader If-None-Match problem with Squid

2005-05-27 Thread Matthias Wessendorf
Hi,

I am again fighting with caching my dynamic content via web proxy.
I noticed a *strange* behaivor. 

I started now debuging my http request headers and saw that (on using Squid)
I allways got no If-None-Match header. My application sets ETag inside of the
response header, so I am wondering, why my application doesn't *see* that header
when we use Squid?

I tested the stuff without Squid, then all works like expected. My appliction 
sets
in first Response the ETag and on second request, we see the correct 
If-None-Match value
for the generated ETag value.

am I still missing something?



BTW. I am using squid/2.5.STABLE7-NT

Thanks for any ideas regarding that.


AW: [squid-users] HttpRequestHeader If-None-Match problem with Squid

2005-05-27 Thread Matthias Wessendorf
If-Modified-Since is also missing

note, the requests are against a Servlet that generates dynamic content.

But when I request static content (that is stored in a folder of my web app)
If-Modified-Since request header was sent?

I used a ServletFilter to *debug* that, so I saw that the If-Modified-Since
was set.

So I have now no idea, why the static content is cacheable, but not my dynamic.

I use something like that to access the dynamic stuff:

http://server/application/contentID/index.html (for dymamic html creation)
http://server/application/contentID/index.pdf (for dymamic pdf creation)

Is it not possible, to cache dynamic content ?
(I don't use Http Request parameters)

I read that paper and I guess, it should be able to do so:
http://www.mnot.net/cache_docs/



Thanks,
Matthias

 -Ursprüngliche Nachricht-
 Von: Matthias Wessendorf [mailto:[EMAIL PROTECTED]
 Gesendet: Freitag, 27. Mai 2005 11:18
 An: squid-users@squid-cache.org
 Betreff: [squid-users] HttpRequestHeader If-None-Match problem with
 Squid
 
 
 Hi,
 
 I am again fighting with caching my dynamic content via web proxy.
 I noticed a *strange* behaivor. 
 
 I started now debuging my http request headers and saw that 
 (on using Squid)
 I allways got no If-None-Match header. My application sets 
 ETag inside of the
 response header, so I am wondering, why my application 
 doesn't *see* that header
 when we use Squid?
 
 I tested the stuff without Squid, then all works like 
 expected. My appliction sets
 in first Response the ETag and on second request, we see 
 the correct If-None-Match value
 for the generated ETag value.
 
 am I still missing something?
 
 
 
 BTW. I am using squid/2.5.STABLE7-NT
 
 Thanks for any ideas regarding that.
 


Re: AW: [squid-users] HttpRequestHeader If-None-Match problem with Squid

2005-05-27 Thread Henrik Nordstrom



On Fri, 27 May 2005, Matthias Wessendorf wrote:


If-Modified-Since is also missing


Do your responses have a Last-Modified? If not there isn't anything to 
relate If-Modified-Since to..



So I have now no idea, why the static content is cacheable, but not my dynamic.


What does the cacheability check engine say about your dynamic content?


Is it not possible, to cache dynamic content ?


There is no difference in caching as such. Most dynamic content however 
does not have any information telling how long it may be cached or when 
the content was last modified so caches assume the content is dynamically 
generated for each request and should not be cached..


For something to be cached caches must have some reasonable means of 
knowing the response may be reused for another request. The 
Expires/Last-Modifed/Cache-Control max-age response headers play a crucial 
role in this. In addition your refresh_pattern rules is used when no 
explicit expiry is known (Expires/max-age)


Regards
Henrik


AW: AW: [squid-users] HttpRequestHeader If-None-Match problem with Squid

2005-05-27 Thread Matthias Wessendorf
I added Expires and it works now as aspected

Thanks for your hints.

Matthias

 -Ursprüngliche Nachricht-
 Von: Henrik Nordstrom [mailto:[EMAIL PROTECTED]
 Gesendet: Freitag, 27. Mai 2005 13:51
 An: Matthias Wessendorf
 Cc: squid-users@squid-cache.org
 Betreff: Re: AW: [squid-users] HttpRequestHeader 
 If-None-Match problem
 with Squid
 
 
 
 
 On Fri, 27 May 2005, Matthias Wessendorf wrote:
 
  If-Modified-Since is also missing
 
 Do your responses have a Last-Modified? If not there isn't 
 anything to 
 relate If-Modified-Since to..
 
  So I have now no idea, why the static content is cacheable, 
 but not my dynamic.
 
 What does the cacheability check engine say about your 
 dynamic content?
 
  Is it not possible, to cache dynamic content ?
 
 There is no difference in caching as such. Most dynamic 
 content however 
 does not have any information telling how long it may be 
 cached or when 
 the content was last modified so caches assume the content is 
 dynamically 
 generated for each request and should not be cached..
 
 For something to be cached caches must have some reasonable means of 
 knowing the response may be reused for another request. The 
 Expires/Last-Modifed/Cache-Control max-age response headers 
 play a crucial 
 role in this. In addition your refresh_pattern rules is used when no 
 explicit expiry is known (Expires/max-age)
 
 Regards
 Henrik
 


Re: AW: AW: [squid-users] HttpRequestHeader If-None-Match problem with Squid

2005-05-27 Thread Henrik Nordstrom

On Fri, 27 May 2005, Matthias Wessendorf wrote:


What does the cacheability check engine say about your
dynamic content?


do you mean the logfile ?


No, I mean the cacheability check engine.

http://www.mnot.net/cacheability/


I am setting the following:
Cache-Control: public, must-revalidate
ETag: a generated Value
Last-Modified: date

but I have no expires


must-revalidate probably makes Squid not cache these.

Is your Last-Modified a proper last modification date, or now?

Regards
Henrik