|
Home > Archive > Squid > April 2004 > [squid-users] Exclude one URL from cache
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
[squid-users] Exclude one URL from cache
|
|
|
| I have squid setup as a reverse proxy and am trying to get one page excluded from cache. I thought I could do this with url_regex or urlpath_regex. Is my syntax wrong because the page still gets cached? How do I get one URL excluded? 2 examples of the
URLs that would be excluded are
http://test.test.com/classifieds-bi...tion=employment
and
http://test.test.com/classifieds-bi...&classification
=autos&date=today,sunday_before(today)&orderby=start_date:d
Here is what I put in the squid.conf file.
acl excludeURL url_regex test.test.com\/classifieds-bin\/classifieds?temp_type=detail&category_number=333&classification
=auto&date=today,sunday_before(today)&orderby=start_date:d
no_cache deny excludeURL
Thanks for the help.
| |
| Andreas Pettersson 2004-04-29, 6:54 pm |
| You have to escape the ? also.
acl excludeURL url_regex
test.test.com\/classifieds-bin\/classifieds\?temp_type=detail&category_numbe
r=333&classification
=auto&date=today,sunday_before(today)&orderby=start_date:d
/Andreas
----- Original Message -----
From: "Nick" <nick@finiteautomata.com>
To: <squid-users@squid-cache.org>
Sent: Monday, April 26, 2004 6:18 PM
Subject: [squid-users] Exclude one URL from cache
> acl excludeURL url_regex
test.test.com\/classifieds-bin\/classifieds?temp_type=detail&category_number
=333&classification
=auto&date=today,sunday_before(today)&orderby=start_date:d
| |
| Henrik Nordstrom 2004-04-29, 6:54 pm |
| On Mon, 26 Apr 2004, Nick wrote:
> I have squid setup as a reverse proxy and am trying to get one page excluded from cache. I thought I could do this with url_regex or urlpath_regex. Is my syntax wrong because the page still gets cached? How do I get one URL excluded? 2 examples of t
he URLs that would be excluded are
> http://test.test.com/classifieds-bi...tion=employment
> and
> http://test.test.com/classifieds-bi...&classification
> =autos&date=today,sunday_before(today)&orderby=start_date:d
>
> Here is what I put in the squid.conf file.
> acl excludeURL url_regex test.test.com\/classifieds-bin\/classifieds?temp_type=detail&category_number=333&classification
> =auto&date=today,sunday_before(today)&orderby=start_date:d
> no_cache deny excludeURL
This is not correct regex syntax for the given URL, and why have you left
out the protocol part? You should also bind the pattern to start/end of
line.
It is mainly ., ? and + you need to escape as these have special meaning
in regex. There is also a few other special characters but these is not
very often seen in URLs. There is no need to escape the / as / is just /
and nothing special.
Complete list of special characters in regex: ^.[]$()|*+?{}\
See
man 7 regex
for a in-depth description of the regex language. Squid uses what is known
as "Modern/Extended" regex, not the old style regex syntax.
Regards
Henrik
| |
|
| Thanks Andreas, sorry my fault. I escaped the '?' but the page appears to still be cached after I restart squid by doing a ./squid -k kill then a ./squid.
I am I still seeing a
TCP_HIT:NONE
in the access log not
TCP_MISS:DIRECT
----- Original Message -----
From: "Andreas Pettersson" <andpet () telia ! com>
Date: 2004-04-26 16:44:30
Message-ID: <005b01c42bad$bf300b70$6402a8c0 () xanp>
You have to escape the ? also.
acl excludeURL url_regex
test.test.com\/classifieds-bin\/classifieds\?temp_type=detail&category_numbe
r=333&classification
=auto&date=today,sunday_before(today)&orderby=start_date:d
/Andreas
----- Original Message -----
From: "Nick" <nick@finiteautomata.com>
To: <squid-users@squid-cache.org>
Sent: Monday, April 26, 2004 6:18 PM
Subject: [squid-users] Exclude one URL from cache
> acl excludeURL url_regex
test.test.com\/classifieds-bin\/classifieds?temp_type=detail&category_number
=333&classification
=auto&date=today,sunday_before(today)&orderby=start_date:d
| |
| Andreas Pettersson 2004-04-29, 6:54 pm |
| Maybe you have to purge the already cached copy.
Try:
# squidclient -p <port> -m PURGE
'http://test.test.com/classifieds-bin/classifieds?temp_type....'
/Andreas
----- Original Message -----
From: "Nick" <nick@finiteautomata.com>
To: <squid-users@squid-cache.org>
Sent: Monday, April 26, 2004 7:54 PM
Subject: Re: [squid-users] Exclude one URL from cache
> Thanks Andreas, sorry my fault. I escaped the '?' but the page appears to
still be cached after I restart squid by doing a ./squid -k kill then a
../squid.
> I am I still seeing a
> TCP_HIT:NONE
> in the access log not
> TCP_MISS:DIRECT
>
>
>
> ----- Original Message -----
> From: "Andreas Pettersson" <andpet () telia ! com>
> Date: 2004-04-26 16:44:30
> Message-ID: <005b01c42bad$bf300b70$6402a8c0 () xanp>
>
> You have to escape the ? also.
>
> acl excludeURL url_regex
>
test.test.com\/classifieds-bin\/classifieds\?temp_type=detail&category_numbe
> r=333&classification
> =auto&date=today,sunday_before(today)&orderby=start_date:d
>
>
> /Andreas
>
>
> ----- Original Message -----
> From: "Nick" <nick@finiteautomata.com>
> To: <squid-users@squid-cache.org>
> Sent: Monday, April 26, 2004 6:18 PM
> Subject: [squid-users] Exclude one URL from cache
>
>
>
test.test.com\/classifieds-bin\/classifieds?temp_type=detail&category_number
> =333&classification
> =auto&date=today,sunday_before(today)&orderby=start_date:d
>
|
|
|
|
|