]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
httputil.rb: fix http.no_expire_cache being IntegerValue
authorfranz <Franz.Netykafka@runbox.com>
Tue, 20 Oct 2009 07:07:27 +0000 (09:07 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 21 Oct 2009 21:02:27 +0000 (23:02 +0200)
It should be BooleanValue, otherwise false would get converted to 0
which would evaluate to true, meaning cache would never expire.

lib/rbot/core/utils/httputil.rb

index 76e3f2987ccfd817002900dc5086f9d86f5172c8..d1eb77ea4dab5a16262907067ac588053b0fadd3 100644 (file)
@@ -190,7 +190,7 @@ class HttpUtil
     Bot::Config.register Bot::Config::IntegerValue.new('http.max_cache_time',
       :default => 60*24,
       :desc => "After how many minutes since first use a cached document is considered to be expired")
-    Bot::Config.register Bot::Config::IntegerValue.new('http.no_expire_cache',
+    Bot::Config.register Bot::Config::BooleanValue.new('http.no_expire_cache',
       :default => false,
       :desc => "Set this to true if you want the bot to never expire the cached pages")
     Bot::Config.register Bot::Config::IntegerValue.new('http.info_bytes',