cache memory used, in MB in interface, in KB in config and in use
[booh] / bin / booh-classifier
index b863a4803112a03ff0c84d3c08a2a06f5b0cc35e..558c4448e93c15ec2ae833758d8e033193a8f5ec 100755 (executable)
@@ -1609,7 +1609,7 @@ def preferences
     if $config['cache-memory-use'] =~ /memfree_(\d+)/
         cache_memfree_spin.value = $1.to_i
     else
-        cache_specify_spin.value = $config['cache-memory-use'].to_i
+        cache_specify_spin.value = $config['cache-memory-use'].to_i / 1024
     end
 
     table_y += 1
@@ -1629,7 +1629,7 @@ def preferences
             if cache_memfree_radio.active?
                 $config['cache-memory-use'] = "memfree_#{cache_memfree_spin.value}%"
             else
-                $config['cache-memory-use'] = cache_specify_spin.value
+                $config['cache-memory-use'] = cache_specify_spin.value.to_i * 1024
             end
             set_cache_memory_use_figure
         end