pfsense:squid:refresh_patterns
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pfsense:squid:refresh_patterns [2020/03/15 11:11] – peter | pfsense:squid:refresh_patterns [2020/07/15 09:30] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 9: | Line 9: | ||
Unfortunately, | Unfortunately, | ||
+ | |||
---- | ---- | ||
+ | |||
+ | ===== Master Refresh Pattern ===== | ||
+ | |||
+ | |||
+ | [[PFSense: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Other Squid Refresh Patterns ===== | ||
+ | |||
+ | [[PFSense: | ||
+ | |||
+ | [[PFSense: | ||
+ | |||
+ | [[PFSense: | ||
+ | |||
+ | [[PFSense: | ||
+ | |||
+ | [[PFSense: | ||
+ | |||
+ | [[PFSense: | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
===== Refresh Pattern Format ===== | ===== Refresh Pattern Format ===== | ||
Line 58: | Line 84: | ||
refresh_pattern ^ftp: 1440 20% 10080 | refresh_pattern ^ftp: 1440 20% 10080 | ||
refresh_pattern ^gopher: 1440 0% 1440 | refresh_pattern ^gopher: 1440 0% 1440 | ||
- | refresh_pattern -i .(gif|png|jpg|jpeg|ico)$ 10080 90% 43200 override-expire ignore-no-cache ignore-no-store ignore-private | + | refresh_pattern -i .(gif|png|jpg|jpeg|ico)$ 10080 90% 43200 |
- | refresh_pattern -i .(iso|avi|wav|mp3|mp4|mpeg|swf|flv|x-flv)$ 43200 90% 432000 override-expire ignore-no-cache ignore-no-store ignore-private | + | refresh_pattern -i .(iso|avi|wav|mp3|mp4|mpeg|swf|flv|x-flv)$ 43200 90% 432000 |
- | refresh_pattern -i .(deb|rpm|exe|zip|tar|tgz|ram|rar|bin|ppt|doc|tiff)$ 10080 90% 43200 override-expire ignore-no-cache ignore-no-store ignore-private | + | refresh_pattern -i .(deb|rpm|exe|zip|tar|tgz|ram|rar|bin|ppt|doc|tiff)$ 10080 90% 43200 |
refresh_pattern -i .index.(html|htm)$ 0 40% 10080 | refresh_pattern -i .index.(html|htm)$ 0 40% 10080 | ||
refresh_pattern -i .(html|htm|css|js)$ 1440 40% 40320 | refresh_pattern -i .(html|htm|css|js)$ 1440 40% 40320 | ||
Line 115: | Line 141: | ||
Install a caching DNS server on your server and have Squid use it so as to cut down on your DNS requests. | Install a caching DNS server on your server and have Squid use it so as to cut down on your DNS requests. | ||
- | |||
- | ---- | ||
- | |||
- | ===== Squid Refresh Patterns - Microsoft ===== | ||
- | |||
- | Sites like Microsoft’s windowsupdate.com, | ||
- | |||
- | Unfortunately, | ||
- | |||
- | Where you have control over the client machines, you can install Microsoft’s Update Server to handle caching for windowsupdate. | ||
- | |||
- | If you cannot use the Update Server, you can use Squid’s delay pools — a bandwidth management technique — to limit the portion of bandwidth that windowsupdate consumes during your peak periods. | ||
- | |||
- | The clients will then have to be online during off-peak periods to complete their updates. | ||
- | |||
- | Below, we configure one global delay pool at 64Kbps (8KBps). | ||
- | |||
- | Traffic for which the ACL of destination domain is windowsupdate.com during the peak period of 10:00-16:00 will be limited to 64Kbps. | ||
- | |||
- | < | ||
- | acl winupdate dstdomain .windowsupdate.com | ||
- | acl peakperiod time 10:00-16:00 | ||
- | delay_pools 1 | ||
- | delay_class 1 1 | ||
- | # 64 Kbit/s | ||
- | delay_parameters 1 8000/8000 | ||
- | delay_access 1 allow winupdate peakperiod | ||
- | </ | ||
- | |||
- | After making changes like the ones above, Squid’s byte hit rate increased from about 8% to between 26-37%. | ||
---- | ---- | ||
Line 156: | Line 152: | ||
===== References ===== | ===== References ===== | ||
+ | |||
+ | http:// | ||
+ | |||
+ | https:// | ||
http:// | http:// |
pfsense/squid/refresh_patterns.1584270666.txt.gz · Last modified: 2020/07/15 09:30 (external edit)