summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/slashdot.rb
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-10-24 15:24:13 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-10-24 15:24:13 +0000
commit43ac960aa89e5a02291fe875627dac88ae7fda34 (patch)
tree6d0cb13f4c299978174d72730c602cd274bbfdba /data/rbot/plugins/slashdot.rb
parent77512a98814b8c8ae5e6314a8bdf30b1967d95d2 (diff)
Initial implementation of proper caching based on last-modified and etag HTTP headers
Diffstat (limited to 'data/rbot/plugins/slashdot.rb')
-rw-r--r--data/rbot/plugins/slashdot.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/data/rbot/plugins/slashdot.rb b/data/rbot/plugins/slashdot.rb
index 30f58dc9..ef96a4b0 100644
--- a/data/rbot/plugins/slashdot.rb
+++ b/data/rbot/plugins/slashdot.rb
@@ -12,7 +12,7 @@ class SlashdotPlugin < Plugin
search = params[:search].to_s
begin
- xml = @bot.httputil.get(URI.parse("http://slashdot.org/search.pl?content_type=rss&query=#{URI.escape(search)}"))
+ xml = @bot.httputil.get_cached(URI.parse("http://slashdot.org/search.pl?content_type=rss&query=#{URI.escape(search)}"))
rescue URI::InvalidURIError, URI::BadURIError => e
m.reply "illegal search string #{search}"
return
@@ -53,7 +53,7 @@ class SlashdotPlugin < Plugin
debug params.inspect
max = params[:limit].to_i
debug "max is #{max}"
- xml = @bot.httputil.get(URI.parse("http://slashdot.org/slashdot.xml"))
+ xml = @bot.httputil.get_cached(URI.parse("http://slashdot.org/slashdot.xml"))
unless xml
m.reply "slashdot news parse failed"
return