Commit bd12f5dc authored by Ad Schellevis's avatar Ad Schellevis

(proxy) add configurable cache_mem, closes https://github.com/opnsense/core/issues/417

parent fdef13da
......@@ -92,6 +92,13 @@
</field>
</subtab>
<subtab id="proxy-general-cache-local" description="Local Cache Settings">
<field>
<id>proxy.general.cache.local.cache_mem</id>
<label>Memory Cache size in Megabytes</label>
<type>text</type>
<help><![CDATA[Enter the cache memory size to use.]]></help>
<advanced>true</advanced>
</field>
<field>
<id>proxy.general.cache.local.enabled</id>
<label>Enable local cache (requires service restart)</label>
......
......@@ -78,6 +78,12 @@
<default>/var/squid/cache</default>
<Required>Y</Required>
</directory>
<cache_mem type="IntegerField">
<default>256</default>
<MinimumValue>1</MinimumValue>
<ValidationMessage>Specify a positive memory cache size. (number of MB's)</ValidationMessage>
<Required>Y</Required>
</cache_mem>
<size type="IntegerField">
<default>100</default>
<MinimumValue>1</MinimumValue>
......
......@@ -276,6 +276,8 @@ cache_dir ufs {{OPNsense.proxy.general.cache.local.directory}} {{OPNsense.proxy.
{% endif %}
{% endif %}
cache_mem {{ OPNsense.proxy.general.cache.local.cache_mem|default('256') }} MB
# Leave coredumps in the first cache dir
coredump_dir /var/squid/cache
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment