Howto Exclude Few Sites from Caching
If you are using SQUID proxy server and you don’t want to cache few sites , use the following directives,
acl NO-CACHE-SITES dstdomain "/etc/squid/not-to-cache-sites.txt" no_cache deny NO-CACHE-SITES
Now create the file which will contains our sites list which we don’t want to cache.
touch /etc/squid/not-to-cache-sites.txt
and add your desired web sites name in /etc/squid/not-to-cache-sites.txt
For example
nano /etc/squid/not-to-cache-sites.txt
and add following or your entries
bankalhabib.com aacable.wordpress.com wordpress.com nae.com.pk jang.com.pk
Now we have to reload squid.conf so changes may apply by following command
squid -k rec
OR
squid -k reconfigure
Howto Exclude Specific Extension from Caching
Similarly if you don’t want to cache *.FLV files , use the following directives
hierarchy_stoplist cgi-bin ? acl QUERY urlpath_regex cgi-bin \? \.flv no_cache deny QUERY
Now we have to reload squid.conf so changes may apply by following command
squid -k rec
OR
squid -k reconfigure
Regard's
Syed Jahanzaib
