[squid-users] Exclude one URL from cache
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Squid > [squid-users] Exclude one URL from cache




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    [squid-users] Exclude one URL from cache  
Nick


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-29-04 11:54 PM

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 e
xcluded?  2 examples of the
URLs that would be excluded are
http://test.test.com/classifieds-bi...
ion=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_ty
pe=detail&category_number=333&classification
=auto&date=today,sunday_before(today)&orderby=start_date:d
no_cache deny excludeURL

Thanks for the help.






[ Post a follow-up to this message ]



    Re: [squid-users] Exclude one URL from cache  
Andreas Pettersson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-29-04 11: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






[ Post a follow-up to this message ]



    Re: [squid-users] Exclude one URL from cache  
Henrik Nordstrom


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-29-04 11: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 wro
ng because the page still gets cached?  How do I get one URL excluded?  2 examples o
f 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






[ Post a follow-up to this message ]



    Re: [squid-users] Exclude one URL from cache  
Nick


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-29-04 11:54 PM

Thanks Andreas, sorry my fault.  I escaped the '?' but the page appears to s
till be cached after I restart squid by doing a ./squid -k kill then a ./squ
id.
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






[ Post a follow-up to this message ]



    Re: [squid-users] Exclude one URL from cache  
Andreas Pettersson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-29-04 11: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
>






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 06:14 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register