Retriever allows caching of the result of a block. It currently supports ruby memory storage and redis.
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
Gemfile
LICENSE.txt
README.rdoc
Rakefile
retriever.gemspec

README.rdoc

Retriever

A block result caching library.

Installation

Either include to your Gemfile or install it.

# Bash
$ gem install retriever

# Gemfile
gem 'retriever'

Rails Usage

Create file config/initializer/retriever.rb with your configuration.

Example retriever.rb

Retriever.config.storage(:memory)
Retreiver.catch! do
  target :bone do |parameters|
    ...
  end
end

Example Usage (Controller)

def index
  @bone = Retriever.fetch(:bone)
end

Documentation

License

Copyright © 2011 Nelvin Driz.

Retriever is free software released under the MIT license.