diff --git a/www/squid/src/opnsense/mvc/app/controllers/OPNsense/Proxy/forms/main.xml b/www/squid/src/opnsense/mvc/app/controllers/OPNsense/Proxy/forms/main.xml
index 998bd76b40..dca5a45f39 100644
--- a/www/squid/src/opnsense/mvc/app/controllers/OPNsense/Proxy/forms/main.xml
+++ b/www/squid/src/opnsense/mvc/app/controllers/OPNsense/Proxy/forms/main.xml
@@ -148,17 +148,24 @@
true
- proxy.general.cache.local.l1
-
+ proxy.general.cache.local.swap_timeout
+
text
- Enter the number of first-level subdirectories for the local cache (default is 16).
+ Prevents Squid from reading/writing to disk if the operation exceeds the specified timelimit in milliseconds (default 0 = disable when left empty).true
- proxy.general.cache.local.l2
-
+ proxy.general.cache.local.max_swap_rate
+
text
- Enter the number of second-level subdirectories for the local cache (default is 256).
+ Limits disk access by setting a maximum I/O rate in swaps per second (default 0 = disable when left empty).
+ true
+
+
+ proxy.general.cache.local.slot_size
+
+ text
+ Defines the size of a database record used to store cached responses. Value should be a multiple of the OS I/O page size (default 16384 when left empty).true
diff --git a/www/squid/src/opnsense/mvc/app/models/OPNsense/Proxy/Proxy.xml b/www/squid/src/opnsense/mvc/app/models/OPNsense/Proxy/Proxy.xml
index 3d77eabfef..84dc90de76 100644
--- a/www/squid/src/opnsense/mvc/app/models/OPNsense/Proxy/Proxy.xml
+++ b/www/squid/src/opnsense/mvc/app/models/OPNsense/Proxy/Proxy.xml
@@ -124,18 +124,21 @@
Specify a positive cache size. (number of MB's)Y
-
- 16
- 1
- Specify a positive number of first-level subdirectories.
- Y
-
-
- 256
- 1
- Specify a positive number of second-level subdirectories.
- Y
-
+
+ 0
+ Specify a valid swap-timeout.
+ N
+
+
+ 0
+ Specify a valid swap-rate.
+ N
+
+
+ 4096
+ Specify a multiple of operating system I/O page size.
+ N
+ 0Y
diff --git a/www/squid/src/opnsense/service/templates/OPNsense/Proxy/squid.conf b/www/squid/src/opnsense/service/templates/OPNsense/Proxy/squid.conf
index d42e8dfa78..f3ff389363 100644
--- a/www/squid/src/opnsense/service/templates/OPNsense/Proxy/squid.conf
+++ b/www/squid/src/opnsense/service/templates/OPNsense/Proxy/squid.conf
@@ -320,7 +320,7 @@ maximum_object_size_in_memory {{OPNsense.proxy.general.cache.local.maximum_objec
memory_cache_mode {{OPNsense.proxy.general.cache.local.memory_cache_mode}}
{% endif %}
{% if OPNsense.proxy.general.cache.local.enabled == '1' %}
-cache_dir ufs {{OPNsense.proxy.general.cache.local.directory}} {{OPNsense.proxy.general.cache.local.size}} {{OPNsense.proxy.general.cache.local.l1}} {{OPNsense.proxy.general.cache.local.l2}}
+cache_dir rock {{OPNsense.proxy.general.cache.local.directory}} {{OPNsense.proxy.general.cache.local.size}}{% if not helpers.empty('OPNsense.proxy.general.cache.local.swap_timeout') %} swap-timeout={{OPNsense.proxy.general.cache.local.swap_timeout}}{% endif %}{% if not helpers.empty('OPNsense.proxy.general.cache.local.max_swap_rate') %} max-swap-rate={{OPNsense.proxy.general.cache.local.max_swap_rate}}{% endif %}{% if not helpers.empty('OPNsense.proxy.general.cache.local.slot_size') %} slot-size={{OPNsense.proxy.general.cache.local.slot_size}}{% endif %}
{% endif %}
{% endif %}
{% endif %}