Re: [squid-users] url rewrite and cache, which URL should be cached?

From: Sylvain Viart <sylvain.viart@dont-contact.us>
Date: Wed, 10 Oct 2007 10:47:10 +0200

Hi,

Found:
> Could it be associated with the urlgroup which somewhat hides the
> rewriting?
>
Yes it is !

snip of the redirector, squid.conf unmodified

while (<>)
{
       # filer rewriting not modified
        if(m[^http://$filer_host/] ||
m[^http://([^/]+)/(js/static_file|media|thumb)])
        {
                #$host = &get_filer;
                s#http://[^/]+(:[0-9]+)?#http://$filer#;

                # add urlgroup
                s/^/!filer! /;
        }
        else
        {
                # php canonization
                if($_ !~ /\.php/)
                {
                        s#http://[^/]+(:[0-9]+)?#http://$php#;
                }

                # add urlgroup, DISABLED it hides rewriting !
                #s/^/!php! /;
        }

        print;
}

from store.log

#urlgroup commented for php rewriting:

1192003008.380 0 12.34.56.78 TCP_MEM_HIT/200 839 GET
http://mes-test2.mydomain.com/js/mailbox.js - NONE/-
application/x-javascript
1192003052.809 3 12.34.56.78 TCP_MISS/200 830 GET
http://sometest.mydomain.com/js/mailbox.js - ROUNDROBIN_PARENT/php-04
application/x-javascript
1192003191.848 5 12.34.56.78 TCP_MISS/200 830 GET
http://testthat.mydomain.com/js/mailbox.js - ROUNDROBIN_PARENT/php-04
application/x-javascript
1192003459.194 0 12.34.56.78 TCP_MEM_HIT/200 838 GET
http://test-0.mydomain.com/js/mailbox.js - NONE/- application/x-javascript
1192003461.945 8 12.34.56.78 TCP_MEM_HIT/200 838 GET
http://test-0.mydomain.com/js/mailbox.js - NONE/- application/x-javascript
1192003494.894 0 12.34.56.78 TCP_MEM_HIT/200 838 GET
http://test-10428.mydomain.com/js/mailbox.js - NONE/-
application/x-javascript
1192003534.370 0 12.34.56.78 TCP_MEM_HIT/200 838 GET
http://test-5769.mydomain.com/js/mailbox.js - NONE/-
application/x-javascript

# urlgroup activated it doesn't seem to work anymore.:
1192003579.940 1 12.34.56.78 TCP_MISS/200 830 GET
http://test-24309.mydomain.com/js/mailbox.js - ROUNDROBIN_PARENT/php-04
application/x-javascript
1192003592.293 1 12.34.56.78 TCP_MISS/200 829 GET
http://test-30186.mydomain.com/js/mailbox.js - ROUNDROBIN_PARENT/php-03
application/x-javascript

Regards,
Sylvain.
Received on Wed Oct 10 2007 - 02:47:15 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Nov 01 2007 - 13:00:01 MDT