On Mon, Jun 21, 2021 at 03:06:38PM +0200, pgajdos wrote:
> --------------------------------8<------------------------------------
> mkdir -p /tmp/apache-rex/mod_proxy-cache/htdocs-backend
> echo 'Backend for reverse' > 
> /tmp/apache-rex/mod_proxy-cache/htdocs-backend/index.html
> 
> sleep 1
> 
> echo "[2] forward proxy with cache"
> for i in $(seq 1 10); do
>   curl -s -v --proxy http://localhost:60083/ http://localhost:60081/ 2>&1 | 
> grep 'X-Cache'
>   sleep 0.1
> done
> -------------------------------->8------------------------------------
> 
> gives:
> 
> $ sh run.sh
> [2] forward proxy with cache
> < X-Cache: MISS from test
> < X-Cache: REVALIDATE from test
> < X-Cache: REVALIDATE from test
> < X-Cache: REVALIDATE from test
> < X-Cache: REVALIDATE from test
> < X-Cache: REVALIDATE from test
> < X-Cache: REVALIDATE from test
> < X-Cache: REVALIDATE from test
> < X-Cache: REVALIDATE from test
> < X-Cache: REVALIDATE from test
> $
> 
> Altering (or touching) the the index file is essential, as well as the
> sleep afterwards.

In other words, when I remove the sleep, I get, without restaring
httpd:

[2] forward proxy with cache
< X-Cache: MISS from test
< X-Cache: HIT from test
< X-Cache: HIT from test
< X-Cache: HIT from test
< X-Cache: HIT from test
< X-Cache: HIT from test
< X-Cache: HIT from test
< X-Cache: HIT from test
< X-Cache: HIT from test
< X-Cache: HIT from test

Furthermore:
When I add the sleep now and do not restart httpd, I get the same
output, 9xHIT. I need to restart httpd first to get 9xREVALIDATE
again.

Petr

-- 
Have a lot of fun!

Reply via email to