Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: Michail Pappas on April 25, 2012, 11:06:44 AM
-
Hello all,
I've read the db commands reference, checked config show squid and searched the forum and wiki, but I was unable to find what I'm looking for: is it possible to simply change the cache size and the RAM allocated (cache_mem) using only by config set commands, or is the only way possible through creating a template?
-
Here's are some notes on general template / service configuration settings:
http://wiki.contribs.org/Template_Tutorial#Detailed_generic_troubleshooting_.26_configuration_steps
The squid configuration file is built based on the templates in /etc/e-smith/templates/etc/squid/squid.conf.
Looking at the template fragments in that folder, I don't see anything about "cache_mem", "cache_dir" or "size" -- so you would have to create custom template fragments if you want to set non-default values for any of these.
-
Sorry for the late reply, been ultra busy...
I think I managed to make my first SME template :)
Just for the record, these are the changes I implemented to allow the user to have a custom cache:
File /etc/e-smith/templates-custom/etc/squid/squid.conf/cache_dir_size/75cache_dir_size (if directory /etc/e-smith/templates-custom/etc/squid/squid.conf/cache_dir_size/ does not exist, create it first):
{
$OUT .= "cache_dir aufs /var/spool/squid/ " . ($squid{cache_dir_size} || '100') . " 16 256\n";
}
Then run the following commands ONCE:
config setprop squid cache_dir_size 1000
expand-template /etc/squid/squid.conf
sv stop squid
sv start squid