Re: [squid-users] About refresh_pattern

2013-07-27 Thread Amos Jeffries

On 27/07/2013 11:03 a.m., Ricardo Rios wrote:

El 2013-07-25 21:30, Ricardo Rios escribió:


On 26/07/2013 12:04 p.m., Ricardo Rios wrote:


Hi list, i am trying to cache some application exe files and updates
using refresh_pattern, when i check my regex at some online tool
tester, regex works great, but when i use it, i dont see anything
else then TCP_MISS/206 on my logs

206 Partial Content means only a portaion of the object was received
back from the server. Squid cannot cache these incomplete objects, so
refresh_pattern is not relevant. You want range_offset -1 to make
Squid fetch the full object when the client requests any sub-portion
like this. But be careful, this option applis to *all* requests and can
cause Squid to fetch large amout fo data from the network which are
never sent to any client (erasing the bandwidth saving benefits of the
cache). Amos


Ho i see, all the request have diff size, i dont noted that, thanks
Amos.


I have 2 more questions about this, if all those updates i want to 
cache, are between 10 and 25 MB, i set range_offset_limit 26 MB and 
squid is going to download the files and give cache HITS ? even if the 
client only want a portion of the file ?


What happens depends on whether there *exist* any updates larger than 
26MB, whether clients try to fetch portions of them past the 26MB limit, 
and whether Squid already has an object in cache it can HIT on.


If Squid already has a cached object to HIT on range_offset_limit is 
never even used. The client will simply get its Range response generated 
as requested from the HIT object.


Any Range request under the limit gets converted to a full-object GET 
request (no Range headers) when sent by Squid to the server. The client 
will get its Range response generated as requested from the reply the 
server sends back.


Any request for Ranges above the limit will be passed on untouched by 
Squid. The reply is passed back to the client without being cached.


Either way the Squid-Client traffic gets optimized down to a Range 
request and Range reply.





Second question, can i set range_offset_limit before the 
refresh_pattern for those updates, then at the end of those 
refresh_pattern i set range_offset_limit 0 for the rest ?


range_offset_limit and refresh_pattern are completely separate 
operations and not related.


== To make range_offset_limit to apply only on some traffic you require 
a minimum of Squid-3.2 and some ACLs to specify which requests each 
limit line applies to. Any range_offset_limit line without ACLs will 
become the default - no range_offset_limit below it will be used, if all 
range_offset_limit lines have ACLs the default is 0.


Amos


Re: [squid-users] About refresh_pattern

2013-07-26 Thread Ricardo Rios

El 2013-07-25 21:30, Ricardo Rios escribió:


On 26/07/2013 12:04 p.m., Ricardo Rios wrote:

Hi list, i am trying to cache some application exe files and 
updates

using refresh_pattern, when i check my regex at some online tool
tester, regex works great, but when i use it, i dont see anything
else then TCP_MISS/206 on my logs
206 Partial Content means only a portaion of the object was 
received
back from the server. Squid cannot cache these incomplete objects, 
so

refresh_pattern is not relevant. You want range_offset -1 to make
Squid fetch the full object when the client requests any sub-portion
like this. But be careful, this option applis to *all* requests and 
can

cause Squid to fetch large amout fo data from the network which are
never sent to any client (erasing the bandwidth saving benefits of 
the

cache). Amos


Ho i see, all the request have diff size, i dont noted that, thanks
Amos.


I have 2 more questions about this, if all those updates i want to 
cache, are between 10 and 25 MB, i set range_offset_limit 26 MB and 
squid is going to download the files and give cache HITS ? even if the 
client only want a portion of the file ?


Second question, can i set range_offset_limit before the 
refresh_pattern for those updates, then at the end of those 
refresh_pattern i set range_offset_limit 0 for the rest ?


Thanks for the answers


Re: [squid-users] About refresh_pattern

2013-07-26 Thread Eliezer Croitoru
On 07/27/2013 02:03 AM, Ricardo Rios wrote:
 I have 2 more questions about this, if all those updates i want to
 cache, are between 10 and 25 MB, i set range_offset_limit 26 MB and
 squid is going to download the files and give cache HITS ? even if the
 client only want a portion of the file ?
 
 Second question, can i set range_offset_limit before the refresh_pattern
 for those updates, then at the end of those refresh_pattern i set
 range_offset_limit 0 for the rest ?
 
 Thanks for the answers
Hey,

Since the settings are being read from top to bottom the last line wins
so never mind the refresh_pattern.

Eliezer


[squid-users] About refresh_pattern

2013-07-25 Thread Ricardo Rios
Hi list, i am trying to cache some application exe files and updates 
using
refresh_pattern, when i check my regex at some online tool tester, 
regex
works great, but when i use it, i dont see anything else then 
TCP_MISS/206

on my logs

Regex:

refresh_pattern download.macromedia.com.*(.exe|.bin) 10800 80% 10800
ignore-no-store ignore-reload reload-into-ims

refresh_pattern armdl.adobe.com/.*\.(exe|msp) 10800  80%  10800
ignore-no-store ignore-reload reload-into-ims


Logs (lots of this):

1374796130.612   1581 10.0.0.58 TCP_MISS/206 23779 GET 
http://download.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_11_active_x.exe 
- HIER_DIRECT/23.12.163.191 application/octet-stream
1374796131.654997 10.0.0.58 TCP_MISS/206 13916 GET 
http://download.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_11_active_x.exe 
- HIER_DIRECT/23.12.163.191 application/octet-stream
1374796132.166463 10.0.0.58 TCP_MISS/206 7533 GET 
http://download.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_11_active_x.exe 
- HIER_DIRECT/23.12.163.191 application/octet-stream


and

1374796907.507   2262 10.0.0.58 TCP_MISS/206 14410 GET 
http://armdl.adobe.com/pub/adobe/reader/win/9.x/9.5.0/es_ES/AdbeRdr950_es_ES.exe 
- HIER_DIRECT/208.185.44.66 application/octet-stream
1374796909.198   1670 10.0.0.58 TCP_MISS/206 7160 GET 
http://armdl.adobe.com/pub/adobe/reader/win/9.x/9.5.0/es_ES/AdbeRdr950_es_ES.exe 
- HIER_DIRECT/208.185.44.66 application/octet-stream
1374796913.060   2786 10.0.0.58 TCP_MISS/206 14201 GET 
http://armdl.adobe.com/pub/adobe/reader/win/9.x/9.5.0/es_ES/AdbeRdr950_es_ES.exe 
- HIER_DIRECT/208.185.44.66 application/octet-stream
1374796915.608   1463 10.0.0.58 TCP_MISS/206 12824 GET 
http://armdl.adobe.com/pub/adobe/reader/win/9.x/9.5.0/es_ES/AdbeRdr950_es_ES.exe 
- HIER_DIRECT/208.185.44.66 application/octet-stream


I am using 50gb rock cache, with 4 workers.
maximum_object_size 500 MB


What i am doing wrong, thanks in advance for any answer.



Re: [squid-users] About refresh_pattern

2013-07-25 Thread Amos Jeffries

On 26/07/2013 12:04 p.m., Ricardo Rios wrote:
Hi list, i am trying to cache some application exe files and updates 
using

refresh_pattern, when i check my regex at some online tool tester, regex
works great, but when i use it, i dont see anything else then 
TCP_MISS/206

on my logs



206 Partial Content means only a portaion of the object was received 
back from the server. Squid cannot cache these incomplete objects, so 
refresh_pattern is not relevant.


You want range_offset -1 to make Squid fetch the full object when the 
client requests any sub-portion like this. But be careful, this option 
applis to *all* requests and can cause Squid to fetch large amout fo 
data from the network which are never sent to any client (erasing the 
bandwidth saving benefits of the cache).


Amos


Re: [squid-users] About refresh_pattern

2013-07-25 Thread Ricardo Rios

On 26/07/2013 12:04 p.m., Ricardo Rios wrote:


Hi list, i am trying to cache some application exe files and updates
using refresh_pattern, when i check my regex at some online tool
tester, regex works great, but when i use it, i dont see anything 
else

then TCP_MISS/206 on my logs


206 Partial Content means only a portaion of the object was 
received

back from the server. Squid cannot cache these incomplete objects, so
refresh_pattern is not relevant.

You want range_offset -1 to make Squid fetch the full object when 
the
client requests any sub-portion like this. But be careful, this 
option

applis to *all* requests and can cause Squid to fetch large amout fo
data from the network which are never sent to any client (erasing the
bandwidth saving benefits of the cache).

Amos


Ho i see, all the request have diff size, i dont noted that, thanks 
Amos.


[squid-users] about refresh_pattern

2008-10-23 Thread Sandy lone
Hello,

Under what cases squid will use refresh_pattern?
If the response objects have expire or age headers, squid will follow
their values.
If the response objects have neither expire nor age headers, squid
will not cache them at all.
So when will squid use the refresh_pattern settings?

Thanks.

-- sandy


Re: [squid-users] about refresh_pattern

2008-10-23 Thread Amos Jeffries

Sandy lone wrote:

Hello,

Under what cases squid will use refresh_pattern?
If the response objects have expire or age headers, squid will follow
their values.


Yes. Unless refresh_pattern have been specified with ignore-* HTTP 
violations.



If the response objects have neither expire nor age headers, squid
will not cache them at all.


No, squid will try to cache unless forbidden (private, no-cache, sets a 
cookie, authenticated pages).



So when will squid use the refresh_pattern settings?


Any pages which had no age information and passed the cacheability tests 
for the above.
I think its tested when followup request need to know about freshness, 
or on garbage collection.


Amos
--
Please use Squid 2.7.STABLE4 or 3.0.STABLE9


Re: [squid-users] about refresh_pattern

2008-10-23 Thread Henrik Nordstrom
On tor, 2008-10-23 at 16:30 +0800, Sandy lone wrote:
 Hello,
 
 Under what cases squid will use refresh_pattern?
 If the response objects have expire or age headers, squid will follow
 their values.

Yes. Unless overridden in refresh_pattern override options.

 If the response objects have neither expire nor age headers, squid
 will not cache them at all.

If there is no Expires then caches are allowed to guess as they like
pretty much.

Responses which should not be cached MUST have suitable Cache-Control
headers, or Expires: now (same as Date header).

Age is a different header. You probably meant Last-Modified, from which
the doument age can be calculated (document_age = Date - Last-Modified)

 So when will squid use the refresh_pattern settings?

In the default settings with a min-age of 0 when there is no Expires but
there is Last-Modified.

If a min-age 0 is used then this is used if there is no Last-Modified.

Regards
Henrik


signature.asc
Description: This is a digitally signed message part