fs-request-cache

1.0.3 • Public • Published

fs-request-cache

Simple http cache using cheerio and fs.

Install

$ yarn add fs-request-cache
# or npm i fs-request-cache 

Usage

import { request, dom } from 'fs-request-cache'
// or const { request, dom } = require('fs-request-cache')
 
const html = await request('https://google.com', {
  ttl: 3600, // one hour
  force: false // default is `false`
})
 
// dom
const $ = await request('https://google.com', {
  ttl: 60, // one minute
})
 
const title = $('title').text()

Test

$ yarn test

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i fs-request-cache

Weekly Downloads

5

Version

1.0.3

License

MIT

Unpacked Size

4.94 kB

Total Files

5

Last publish

Collaborators

  • mallendeo