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
- Host: GitHub
- URL: https://github.com/tigris/open-uri-cached
- Owner: tigris
- License: mit
- Created: 2010-02-26T22:39:27.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2021-12-28T10:47:19.000Z (over 2 years ago)
- Last Synced: 2024-01-11T05:15:40.153Z (6 months ago)
- Language: HTML
- Homepage:
- Size: 22.5 KB
- Stars: 32
- Watchers: 3
- Forks: 18
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-stars - tigris/open-uri-cached - Disk caching for open-uri (HTML)
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!`