Article delegate-en/3577 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A3576@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: Odd HTTP proxy caching retrieval behaviour
12 Nov 2006 00:47:23 GMT "Tetsu Saiga" <p6qgqbdyi-fjxi26avzhtr.ml@ml.delegate.org>


You're right there's a "Cache-Control: no-cache".
     1	GET xxxxxxxxxx HTTP/1.1
     2	Content-Type: application/x-www-form-urlencoded
     3	Keep-Alive: 300
     4	User-Agent: xxxxx
     5	Host: xxx.xxx.xxx.xxx
     6	Cache-Control: no-cache

What I'm trying to do is have DeleGate cache for everything
transparently independant of the client. I thought about filtering out
"Cache-Control: no-cache" with HTTPCONF but that only modifies the
header and not how DeleGate functions.

I got it to work by using 2 HTTP proxies. The 1st one would just
filter out Cache-Control and then the 2nd would do the actual work.
Seems like a good idea for DeleGate to use the headers it modifies
though.

delegated -P8080 SERVER=http CACHE=do ADMIN=y
HTTPCONF=kill-qhead:Cache-Control FCL="-tee-h-n"
ROUTE="http://localhost:8081-_-{*:80}" -vd

delegated -P8081 SERVER=http CACHE=do ADMIN=y FCL="-tee-h-n" -vd

I also tried using CFI but that just messed things up.
#!cfi
Remove/Cache-Control: no-cache

I'm just wondering if there's a better way than using HTTPCONF and 2 proxies.

Thanks.

Tetsu

On 11/11/06, Yutaka Sato <feedback@delegate.org> wrote:
> In message <_A3575@delegate-en.ML_> on 11/11/06(14:11:43)
> you "Tetsu Saiga" <p6qgqbdyi-fjxi26avzhtr.ml@ml.delegate.org> wrote:
>  |The HTTP proxy runs with "delegated -P8080 SERVER=http CACHE=do".
>  |Files are cached but they do not get used after the same file is
>  |retrieved. Instead the file is retrieved and then re-cached.
>  |
>  |I can force cache to be used with "delegated -P8080 SERVER=http
>  |CACHE=do CONNECT="cache:*:*"". This makes the page load only if
>  |there's a cache and cache retrieval works fine. However, non-cache
>  |pages won't work.
>  |
>  |Here are some logs for HTTP with caching, caching only, and the
>  |response header. Logs are for different files on the same host.
>  |Outputs were generally the same except for the file name.
>  |
>  |I don't see a lot of difference except with cache only there's a "HTTP
>  |cache-VALID". Any ideas on how to get the cache working or force it to
>  |work?
>  |
>  |
>  |Cache not working log:
> ...
>  |[1328] 5+2/6/6: REQUEST = (no-cache)[http://xxx.xxx.xxx.xxx:80/] GET
>  |xxxxxxxxxx HTTP/1.1^M
>
> This "(no-cache)" in the log means the request from the client indicated
> not to use the cache, maybe with "Pragma: no-cache" or "Cache-Control:
> max-age=0" or so which is issued with a "Reload button" of the browser.
> You can record the request header into the LOGFILE with a parameter:
>
>   FCL="-tee-h-n"
>
> The request should be with "If-Modified-Since" field and, if there has
> been no modification on the data, the response from the server will be
> "304 Not-changed" without body to be rewritten to the cache.
>
> Cheers,
> Yutaka
> --
>   9 9   Yutaka Sato <y.sato@delegate.org> http://delegate.org/y.sato/
>  ( ~ )  National Institute of Advanced Industrial Science and Technology
> _<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
> Do the more with the less -- B. Fuller
>

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V