public
Description: Use Moneta to provide get_and_set method and compressed feature.
Homepage:
Clone URL: git://github.com/ihower/handcache.git
name age message
file LICENSE Wed Aug 05 00:50:34 -0700 2009 First commit [ihower]
file README Tue Aug 18 12:58:38 -0700 2009 Use moneta to unifiy key-value store interface [ihower]
directory lib/ Tue Aug 18 12:58:38 -0700 2009 Use moneta to unifiy key-value store interface [ihower]
README
handcache use Moneta(http://github.com/wycats/moneta) to provide get_and_set method and compressed feature.

== USAGE

Moneta provide many stores, for example:

Add below line to your environment.rb

CacheStore = Moneta::Memory.new

or

CacheStore = Moneta::Memcache.new( :server => "127.0.0.1" )

Then in your code:

data = Handcache.get_and_set("data-123", :expires_in => 60 ) do
          "cached-foobar"
       end