Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

httparty-icebox

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

httparty-icebox

  • 0.0.4
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

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 (Current maintainer)

  • Karel Minarik (Original creator through a gist)

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.

FAQs

Package last updated on 03 Jan 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc