Koozali.org: home of the SME Server

squid not cachine sme7rc2

Offline tariqf

  • *****
  • 179
  • +0/-0
squid not cachine sme7rc2
« on: May 05, 2006, 12:21:26 PM »
Hi everyone I've got sme7 rc2 installed and it's set as a gateway and also dhcp server. Now all my clients can browse the internet etc. but squid does not seem to be caching anything.

For example if I download a 1MB file from a website on one PC and then attempt to do the same from another it simply downloads again from the internet rather than getting a cached version from sme.

Please can anyone shed some light on this? Does squid ever cache files in transparent mode? I'm not sure what I need to do and it's so annoying because I've got about 20 users downloading the same files all day killing my bandwidth!

Thanks in advance

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: squid not cachine sme7rc2
« Reply #1 on: May 05, 2006, 08:57:32 PM »
Quote from: "tariqf"
Hi everyone I've got sme7 rc2 installed and it's set as a gateway and also dhcp server. Now all my clients can browse the internet etc. but squid does not seem to be caching anything.


Nothing at all? Check /var/log/squid/store.log.

Quote

For example if I download a 1MB file from a website on one PC and then attempt to do the same from another it simply downloads again from the internet rather than getting a cached version from sme.


squid won't cache the file if it comes with HTTP headers which say it shouldn't be cached.
It also won't cache above a configured max-size - but I don't think we have one of those configured.

Please can anyone shed some light on this? Does squid ever cache files in transparent mode? I'm not sure what I need to do and it's so annoying because I've got about 20 users downloading the same files all day killing my bandwidth!

Thanks in advance[/quote]

Offline pfloor

  • *****
  • 889
  • +1/-0
Re: squid not cachine sme7rc2
« Reply #2 on: May 12, 2006, 04:38:33 AM »
Quote from: "CharlieBrady"
Quote from: "tariqf"
Hi everyone I've got sme7 rc2 installed and it's set as a gateway and also dhcp server. Now all my clients can browse the internet etc. but squid does not seem to be caching anything.


Nothing at all? Check /var/log/squid/store.log.

Quote

For example if I download a 1MB file from a website on one PC and then attempt to do the same from another it simply downloads again from the internet rather than getting a cached version from sme.


squid won't cache the file if it comes with HTTP headers which say it shouldn't be cached.
It also won't cache above a configured max-size - but I don't think we have one of those configured.

[/quote]Squid is set by default to a max object size of 4MB.  You can raise that limit to 20 MB (or whatever you want) by the following.  Be warned that your squid cache may become very LARGE if you are not careful with this setting:

Make a custom template directory if it doesn't exist:
# mkdir -p /etc/e-smith/templates-custom/etc/squid/squid.conf

Place template fragment into temlplate directory:
# echo "maximum_object_size 20480 KB" > /etc/e-smith/templates-custom/etc/squid/squid.conf/20Maximum_object_size

Expand the Template:
# /sbin/e-smith/expand-template /etc/squid/squid.conf

Restart squid to enable new settings:
# /etc/rc7.d/S90squid restart

Another interesting item I have discovered at my office is that some of the XP machines here use the squid cache and others don't.  I have not been able to figure why but I can force IE and Firefox to use the squid cache by setting them manually in their options.
In life, you must either "Push, Pull or Get out of the way!"

cc_skavenger

squid not cachine sme7rc2
« Reply #3 on: May 14, 2006, 06:37:45 AM »
have you just tried using the following command:

tail -f /var/log/squid/access.log

This will show what is being cached in real time.

HTH