mbox

Add RAM-only Proxy functionality - Bug Report #10592

Message ID 56807AF3.3000109@gmx.de
State Superseded
Headers

Message

Xaver4all Dec. 28, 2015, 10:57 a.m. UTC
  Squiddoesn't use RAM only for caching, if you set cachesize for disk
usage =0 andmemory cachesize >0 in GUI.
Now if you set "cache_size"=0 and "cache_mem">0,caching won't be
disabled completely ("cache deny all").
If you want todisable caching completely you must set "cache_size"=0 and
"cache_mem"=0.
Besides this "maximum_object_size_in_memory" will be set to 512KB.

Originally reported by qiller in Bugtracker form over one year. I just
created the diff an tested this on my IP-Fire.

Especially for the announced 64 Bit version of IP-Fire, where Squid can
handel more RAM, this may be useful.

Reported-by: qiller
Signed-off-by: Kim Wölfel <xaver4all@gmx.de>
---
 html/cgi-bin/proxy.cgi | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

 
@@ -3270,7 +3270,12 @@ cache_dir aufs /var/log/cache
$proxysettings{'CACHE_SIZE'} $proxysettings{'L1_DI
 END
         ;
     } else {
-        print FILE "cache deny all\n\n";
+        if ($proxysettings{'CACHE_MEM'} > 0)
+        {
+            print FILE "maximum_object_size_in_memory 512 KB\n\n";
+        } else {
+            print FILE "cache deny all\n\n";
+        }
     }
 
     print FILE <<END