Giter Site home page Giter Site logo

httparty-icebox's Introduction

HTTParty-Icebox - Caching for HTTParty

Deprecation notice

HTTParty-Icebox is no longer being maintained.

As I haven't used HTTParty for a long time, and don't like feeling bad about neglecting HTTParty-Icebox, I've decided to deprecate it. Check out CacheBar instead.

If you're interested in taking over let me know. I should still have my unfinished rewrite somewhere.

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

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 - Major parts of this code are based on the architecture of ApiCache.
  • David Heinemeier Hansson - Other parts are inspired by the ActiveSupport::Cache in Ruby On Rails.
  • Amit Chakradeo - 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 - Original Memcached store.

httparty-icebox's People

Contributors

denkristoffer avatar onefriendaday avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.