squidcacheServices: Squid Advanced Proxyinstalledpackages->package->squidcache->configuration->settings/pkg_edit.php?xml=squid_cache.xml&id=0General Settings/pkg_edit.php?xml=squid_ng.xml&id=0Upstream Proxy/pkg_edit.php?xml=squid_upstream.xml&id=0Cache Mgmt/pkg_edit.php?xml=squid_cache.xml&id=0Network Access Control/pkg_edit.php?xml=squid_nac.xml&id=0Traffic Mgmt/pkg_edit.php?xml=squid_traffic.xml&id=0Memory Cache Size (MB)memory_cache_sizeThis is the amount of physical RAM to be used for negative cache and in-transit objects. This value should not exceed more than 50% of installed RAM. The minimum value is 1MB; the default is 8MB4inputnumberHard Disk Cache Size (MB)harddisk_cache_sizeThis is the amount of disk space (MB) to use for cached objects. The default is 50MB.4inputnumberMinimum Object Size (KB)minimum_object_sizeObjects smaller than the size specified will not be saved on disk. This value is specified in kilobytes and the default is 0, meaning there is no minimum.4inputnumberMaximum Object Size (KB)maximum_object_sizeObjects larger than the size specified will not be saved on disk. This value is specified in kilobytes and the default is 4MB. If you wish to increase speed more than you want to save bandwidth, this should be set to a low value.4inputnumberNumber of Level-1 Subdirectorieslevel_subdirsThe default for this value is 16. Each level-1 directory contains 256 subdirectories, so a value of 256 level-1 directories will use a total of 65536 directories for the hard disk cache. This will significantly slow down the startup process of the proxy service, but can speed up the caching under certain conditions.selectMemory Replacement Policymemory_replacementThe memory replacement policy determines which objects are purged from memory when space is needed. The default policy for memory replacement is GSDF. <p> <b> LRU: Last Recently Used Policy </b> - The LRU policies keep recently referenced objects. i.e., it replaces the object that has not been accessed for the longest time. <p> <b> Heap GSDF: Greedy-Dual Size Frequency </b> - The Heap GSDF policy optimizes object-hit rate by keeping smaller, popular objects in cache. It achieves a lower byte hit rate than LFUDA though, since it evicts larger (possibly popular) objects. <p> <b> Heap LFUDA: Least Frequently Used with Dynamic Aging </b> - The Heap LFUDA policy keeps popular objects in cache regardless of their size and thus optimizes byte hit rate at the expense of hit rate since one large, popular object will prevent many smaller, slightly less popular objects from being cached. <p> <b> Heap LRU: Last Recently Used </b> - Works like LRU, but uses a heap instead. <p> Note: If using the LFUDA replacement policy, the value of Maximum Object Size should be increased above its default of 4096 KB to maximuze the potential byte hit rate improvement of LFUDA.selectCache Replacement Policycache_replacementThe cache replacement policy decides which objects will remain in cache and which objects are replaced to create space for the new objects. The default policy for cache replacement is LFUDA.selectDomaindomainIf required, the specified domains will never be cached. Enter domains separated by a semicolon (;).textarea1050Enable Offline Modeenable_offlinecheckbox
require_once("/usr/local/pkg/squid_ng.inc");
global_write_squid_config();
mwexec("/usr/local/sbin/squid -k reconfigure");