summaryrefslogtreecommitdiff
path: root/lib/feed2imap
diff options
context:
space:
mode:
Diffstat (limited to 'lib/feed2imap')
-rw-r--r--lib/feed2imap/cache.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/feed2imap/cache.rb b/lib/feed2imap/cache.rb
index 9fb9930..9c5977c 100644
--- a/lib/feed2imap/cache.rb
+++ b/lib/feed2imap/cache.rb
@@ -110,6 +110,17 @@ class ItemCache
@@cacheidx += 1
i
end
+
+ def cleanup(feeds)
+ remaining = {}
+ feeds.each do |f|
+ id = f.name
+ if @channels.key?(id)
+ remaining[id] = @channels[id]
+ end
+ end
+ @channels = remaining
+ end
end
class CachedChannel