Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
bd12f5dc
Commit
bd12f5dc
authored
Jan 07, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(proxy) add configurable cache_mem, closes
https://github.com/opnsense/core/issues/417
parent
fdef13da
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
main.xml
...pnsense/mvc/app/controllers/OPNsense/Proxy/forms/main.xml
+7
-0
Proxy.xml
src/opnsense/mvc/app/models/OPNsense/Proxy/Proxy.xml
+6
-0
squid.conf
src/opnsense/service/templates/OPNsense/Proxy/squid.conf
+2
-0
No files found.
src/opnsense/mvc/app/controllers/OPNsense/Proxy/forms/main.xml
View file @
bd12f5dc
...
@@ -92,6 +92,13 @@
...
@@ -92,6 +92,13 @@
</field>
</field>
</subtab>
</subtab>
<subtab
id=
"proxy-general-cache-local"
description=
"Local Cache Settings"
>
<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>
<field>
<id>
proxy.general.cache.local.enabled
</id>
<id>
proxy.general.cache.local.enabled
</id>
<label>
Enable local cache (requires service restart)
</label>
<label>
Enable local cache (requires service restart)
</label>
...
...
src/opnsense/mvc/app/models/OPNsense/Proxy/Proxy.xml
View file @
bd12f5dc
...
@@ -78,6 +78,12 @@
...
@@ -78,6 +78,12 @@
<default>
/var/squid/cache
</default>
<default>
/var/squid/cache
</default>
<Required>
Y
</Required>
<Required>
Y
</Required>
</directory>
</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"
>
<size
type=
"IntegerField"
>
<default>
100
</default>
<default>
100
</default>
<MinimumValue>
1
</MinimumValue>
<MinimumValue>
1
</MinimumValue>
...
...
src/opnsense/service/templates/OPNsense/Proxy/squid.conf
View file @
bd12f5dc
...
@@ -276,6 +276,8 @@ cache_dir ufs {{OPNsense.proxy.general.cache.local.directory}} {{OPNsense.proxy.
...
@@ -276,6 +276,8 @@ cache_dir ufs {{OPNsense.proxy.general.cache.local.directory}} {{OPNsense.proxy.
{%
endif
%}
{%
endif
%}
{%
endif
%}
{%
endif
%}
cache_mem
{{
OPNsense
.
proxy
.
general
.
cache
.
local
.
cache_mem
|
default
(
'256'
) }}
MB
# Leave coredumps in the first cache dir
# Leave coredumps in the first cache dir
coredump_dir
/
var
/
squid
/
cache
coredump_dir
/
var
/
squid
/
cache
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment