Pages

Senin, 13 Juni 2011

How can I make Squid NOT cache some servers or URLs?

How can I make Squid NOT cache some servers or URLs?

In Squid-2, you use the no_cache option to specify uncachable requests. For example, this makes all

responses from origin servers in the 10.0.1.0/24 network uncachable:

acl Local dst 10.0.1.0/24
        no_cache deny Local
This example makes all URL's with '.html' uncachable:

acl HTML url_regex .html$
        no_cache deny HTML
This example makes  a specific URL uncachable:

acl XYZZY url_regex ^http://www.i.suck.com/foo.html$
        no_cache deny XYZZY
 
acl XYZZY url_regex ^http://imroninfo.blogspot.com
no_cache deny XYZZY 
 
============================== 
Untuk di pf
Proxy server: General settings->Custom Options

zph_mode tos;zph_local 0x04;zph_parent 0;zph_option 136;
acl HTML url_regex .ini$;no_cache deny HTML;
acl XYZZY url_regex ^http://122.102.49.132/audition/Update.ini$;
acl XYZZY url_regex ^http://patch.crossfire.web.id/download/version.ini$;
acl XYZZY url_regex ^http://patch.sealindo.com/patch/normal/version.ini$;
no_cache deny XYZZY;

================

Contoh Lain :


acl all src "/etc/squid/acl_ip_allowed.txt"
acl acl_contoh_url_slow url_regex -i "/etc/squid/acl_contoh_url_slow.txt"
http_access allow acl_contoh_url_slow
http_access allow all

delay_pools 9

delay_class     1       2
delay_class     2       2
delay_class     3       2
delay_class     4       2
delay_class     5       2
delay_class     6       2
delay_class     7       2
delay_class     8       2
delay_class     9       2

delay_parameters 1      -1/-1   -1/-1
delay_parameters 2      -1/-1   5000/5000
delay_parameters 3      -1/-1   5000/5000
delay_parameters 4      -1/-1   3000/3000
delay_parameters 5      -1/-1   5000/5000
delay_parameters 6      -1/-1   5000/5000
delay_parameters 7      -1/-1   5000/5000
delay_parameters 8      -1/-1   1000/500
delay_parameters 8      -1/-1   1000/1000


delay_access 1 allow acl_destinationIP
delay_access 2 allow acl_ext_dibatasi_exe_rar_zip
delay_access 3 allow acl_208117
delay_access 4 allow acl_4shared_other_storage
delay_access 5 allow acl_videoplayback
delay_access 6 allow acl_facebook_dilimit
delay_access 7 allow acl_ext_dibatasi_many
delay_access 8 allow acl_superslow
delay_access 9 allow acl_contoh_url_slow all


 

Tidak ada komentar:

Posting Komentar