feedtools cache
What
FeedTools cache extensions provides various cache plugins (e.g. YAML file cache) for FeedTools.
Available Plugin List
- FeedTools::Cache::YAML
- FeedTools::Cache::Memcached
FeedTools::Cache::YAML
Installing
sudo gem install feedtools-cache-yaml
Demonstration of usage
require 'rubygems'
require 'feed_tools'
require 'feedtools-cache-yaml'
# or if you manually installed(non-gem), require 'feedtools/cache/yaml'
# set cache configuration
FeedTools.configurations[:feed_cache] = FeedTools::Cache::YAML
# fetch from the web
feed = FeedTools::Feed.open('http://dontstopmusic.no-ip.org/diary/index.rdf')
p feed.live? #=> true
# use the cache
feed = FeedTools::Feed.open('http://dontstopmusic.no-ip.org/diary/index.rdf')
p feed.live? #=> false
Document
See rdoc document.
Licence
Ruby’s
FeedTools::Cache::Memcached
Installing
sudo gem install feedtools-cache-memcached
Demonstration of usage
require 'rubygems'
require 'feed_tools'
require 'feedtools-cache-memcached'
# or if you manually installed(non-gem), require 'feedtools/cache/memcached'
# set cache configuration
FeedTools.configurations[:feed_cache] = FeedTools::Cache::Memcached
# fetch from the web
feed = FeedTools::Feed.open('http://dontstopmusic.no-ip.org/diary/index.rdf')
p feed.live? #=> true
# use the cache
feed = FeedTools::Feed.open('http://dontstopmusic.no-ip.org/diary/index.rdf')
p feed.live? #=> false
Document
See rdoc document.
Licence
Ruby’s
Theme extended from Paul Battley