Sha256: e59476b90186b3b2a6f32f7f32b4d9ce3fdbee69b84deb9831894c7e3e1029b8

Contents?: true

Size: 1.86 KB

Versions: 11

Compression:

Stored size: 1.86 KB

Contents

# HTTParty-Icebox - Caching for HTTParty

## Description

Cache responses in HTTParty models

## Installation

### RubyGems

You can install the latest Film Buff gem using RubyGems

    gem install httparty-icebox

### GitHub

Alternatively you can check out the latest code directly from Github

    git clone http://github.com/sachse/httparty-icebox.git

## Usage



### Examples

Enable caching with default values:

    require 'httparty-icebox'
    
    include HTTParty::Icebox
    
    cache
    # Use HTTParty's .get method as usual, the response will now be cached
    cached_response = HTTParty.get("https://github.com/sachse/httparty-icebox")

Cache responses for 5 minutes on the system in the directory "/tmp":

    require 'httparty-icebox'
    
    include HTTParty::Icebox
    
    cache :store => 'file', :timeout => 300, :location => '/tmp/'
    # Use HTTParty's .get method as usual, the response will now be cached
    cached_response = HTTParty.get("https://github.com/sachse/httparty-icebox")

## Authors

- [Kristoffer Sachse](https://github.com/sachse) (Current maintainer)

- [Karel Minarik](http://karmi.cz) (Original creator through [a gist](https://gist.github.com/209521/))

## Contribute

Fork the project, implement your changes in it's own branch, and send
a pull request to me. I'll gladly consider any help or ideas.

### Contributors

- [Martyn Loughran](https://github.com/mloughran) - Major parts of this code are based on the architecture of ApiCache.
- [David Heinemeier Hansson](https://github.com/dhh) - Other parts are inspired by the ActiveSupport::Cache in Ruby On Rails.
- [Amit Chakradeo](https://github.com/amit) - For pointing out response objects have to be stored marshalled on FS.
- Marlin Forbes - For pointing out the query parameters have to be included in the cache key.
- [ramieblatt](https://github.com/ramieblatt) - Original Memcached store.

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
httparty-icebox-delooks-0.0.8 README.md
httparty-icebox-delooks-0.0.7 README.md
httparty-icebox-delooks-0.0.6 README.md
httparty-icebox-delooks-0.0.5 README.md
httparty-icebox-delooks-0.0.4 README.md
httparty-icebox-0.0.4 README.md
jashmenn-httparty-icebox-0.0.4 README.md
jashmenn-httparty-icebox-0.0.3 README.md
httparty-icebox-0.0.3 README.md
httparty-icebox-0.0.2 README.md
httparty-icebox-0.0.1 README.md