aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/squid/squid.inc6
-rw-r--r--packages/squid/squid_cache.xml14
2 files changed, 20 insertions, 0 deletions
diff --git a/packages/squid/squid.inc b/packages/squid/squid.inc
index 94d50cf9..4b3e3b05 100644
--- a/packages/squid/squid.inc
+++ b/packages/squid/squid.inc
@@ -539,6 +539,10 @@ function squid_resync_cache() {
$min_objsize = ($settings['minimum_object_size'] ? $settings['minimum_object_size'] : 0);
$cache_policy = ($settings['cache_replacement_policy'] ? $settings['cache_replacement_policy'] : 'heap LFUDA');
$memory_policy = ($settings['memory_replacement_policy'] ? $settings['memory_replacement_policy'] : 'heap GDSF');
+
+ $cache_swap_low = ($settings['cache_swap_low'] ? $settings['cache_swap_low'] : '90');
+ $cache_swap_high = ($settings['cache_swap_high'] ? $settings['cache_swap_high'] : '95');
+
$offline_mode = ($settings['enable_offline'] == 'on' ? 'on' : 'off');
$conf = <<<EOD
@@ -548,6 +552,8 @@ maximum_object_size $max_objsize KB
minimum_object_size $min_objsize KB
cache_replacement_policy $cache_policy
memory_replacement_policy $memory_policy
+cache_swap_low $cache_swap_low
+cache_swap_high $cache_swap_high
offline_mode $offline_mode
EOD;
diff --git a/packages/squid/squid_cache.xml b/packages/squid/squid_cache.xml
index 861f96b8..6f6c0388 100644
--- a/packages/squid/squid_cache.xml
+++ b/packages/squid/squid_cache.xml
@@ -165,6 +165,20 @@
</options>
</field>
<field>
+ <fielddescr>Low-water-mark in %</fielddescr>
+ <fieldname>cache_swap_low</fieldname>
+ <description>Cache replacement begins when the swap usage is above the low-low-water mark and attempts to maintain utilisation near the low-water-mark.</description>
+ <type>input</type>
+ <default_value>90</default_value>
+ </field>
+ <field>
+ <fielddescr>High-water-mark in %</fielddescr>
+ <fieldname>cache_swap_high</fieldname>
+ <description>As swap utilisation gets close to the high-water-mark object eviction becomes more aggressive.</description>
+ <type>input</type>
+ <default_value>95</default_value>
+ </field>
+ <field>
<fielddescr>Do not cache</fielddescr>
<fieldname>donotcache</fieldname>
<description>Enter each domain or IP address on a new line that should never be cached.</description>