Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/tigris/open-uri-cached

Disk caching for open-uri
https://github.com/tigris/open-uri-cached

Last synced: 3 months ago
JSON representation

Disk caching for open-uri

Lists

README

        

# OpenURI with caching

Carelessly make OpenURI requests without getting hate mail.

## Usage

Require the library

require 'open-uri/cached'
open('http://www.someone-that-hates-being-scraped.com').read

## Configuring

`OpenURI::Cache.cache_path = '/tmp/open-uri'`

## Invalidating

`OpenURI::Cache.invalidate('https://example.com/')`

`OpenURI::Cache.invalidate_all!`