3 # A form for editing memory usage options
5 require './squid-lib.pl';
6 $access{'musage'} || &error($text{'emem_ecannot'});
7 &ui_print_header(undef, $text{'emem_header'}, "", "edit_mem", 0, 0, 0, &restart_button());
10 print "<form action=save_mem.cgi>\n";
11 print "<table border width=100%>\n";
12 print "<tr $tb> <td><b>$text{'emem_maduo'}</b></td> </tr>\n";
13 print "<tr $cb> <td><table width=100%>\n";
16 if ($squid_version < 2) {
17 print &opt_input($text{'emem_mul'}, "cache_mem", $conf,
18 $text{'default'}, 6, $text{'emem_mb'});
19 print &opt_input($text{'emem_dul'}, "cache_swap",
20 $conf, $text{'default'}, 6, $text{'emem_mb'});
23 print &opt_bytes_input($text{'emem_mul'}, "cache_mem", $conf,
25 print &opt_input($text{'emem_fcs'}, "fqdncache_size", $conf,
31 if ($squid_version < 2.5) {
32 print &opt_input($text{'emem_mhwm'}, "cache_mem_high", $conf,
33 $text{'default'}, 4, "%");
34 print &opt_input($text{'emem_mlwm'}, "cache_mem_low", $conf,
35 $text{'default'}, 4, "%");
40 print &opt_input($text{'emem_dhwm'}, "cache_swap_high", $conf,
41 $text{'default'}, 4, "%");
42 print &opt_input($text{'emem_dlwm'}, "cache_swap_low", $conf,
43 $text{'default'}, 4, "%");
47 if ($squid_version < 2) {
48 print &opt_input($text{'emem_mcos'}, "maximum_object_size",
49 $conf, $text{'default'}, 8, $text{'emem_kb'});
52 print &opt_bytes_input($text{'emem_mcos'},
53 "maximum_object_size", $conf, $text{'default'}, 6);
55 print &opt_input($text{'emem_iacs'}, "ipcache_size", $conf,
56 $text{'default'}, 6, $text{'emem_e'});
60 print &opt_input($text{'emem_ichwm'}, "ipcache_high", $conf,
61 $text{'default'}, 4, "%");
62 print &opt_input($text{'emem_iclwm'}, "ipcache_low", $conf,
63 $text{'default'}, 4, "%");
66 if ($squid_version >= 2.4) {
68 print &select_input($text{'emem_crp'}, "cache_replacement_policy", $conf, '',
69 $text{'default'}, '', $text{'emem_lru'}, 'lru',
70 $text{'emem_gdsf'}, 'heap GDSF', $text{'emem_lfuda'}, 'heap LFUDA',
71 $text{'emem_hlru'}, 'heap LRU');
72 print &select_input($text{'emem_mrp'}, "memory_replacement_policy", $conf, '',
73 $text{'default'}, '', $text{'emem_lru'}, 'lru',
74 $text{'emem_gdsf'}, 'heap GDSF', $text{'emem_lfuda'}, 'heap LFUDA',
75 $text{'emem_hlru'}, 'heap LRU');
79 print "</table></td></tr></table>\n";
80 print "<input type=submit value='$text{'buttsave'}'></form>\n";
82 &ui_print_footer("", $text{'emem_return'});