Socket
Book a DemoInstallSign in
Socket

cacheur

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cacheur

A modular HTTP / API result cacher and transformer that runs as a CLI application

0.6.13
latest
Source
npmnpm
Version published
Weekly downloads
2
100%
Maintainers
1
Weekly downloads
 
Created
Source

npm version Dependency Status Build Status Code Climate Test Coverage

About

cacheur is a Node.js CLI tool for caching and transforming API results. It is built with modularity and simplicity in mind.

This application should work stable enough, but is still in heavy development.

Install

Install globally

$ npm install -g cacheur

Usage

Run cacheur

# Within the project dir cacheur can be called directly:
cacheur

# It is possible to manually set the project directory:
cacheur --dir "/C/Dropbox/Software Projekte/cbmodel/caches/"

Set up project

cacheur excepts a project directory that contains config files, containing the specific job settings and a project wide global _setting.yaml file.

Example Jobs

See: /examples

Cache an generic JSON API

http:
  url: https://api.github.com/repos/jquery/jquery/issues
  queryString:
    state: open

This will make a http request to the GitHub API at given url and cache the result. The optional queryString object may contain URL parameters. In this case ?state=open will be appended to the url. The cache will be updated every 10 seconds.

Fetch a CSV file

cacheExpiration: 360
timeout: 180
retryDelay: 30

http:
  url: https://data.cityofnewyork.us/api/views/5b3a-rs48/rows.csv?accessType=DOWNLOAD

This fetches a bigger CSV file from, renews the cache every 360 seconds. It will wait 180 seconds before timeout (this might however be shortened by your network settings). If the request fails, cacheur will retry after 30 seconds.

Cache an SemanticMediaWiki ASK Query

Roadmap

  • Transform data formats (CSV to JSON object)
  • Support JSON Path Queries though an ?q= param

Run cacheur as a linux service

License

MIT © Simon Heimler

Keywords

caching

FAQs

Package last updated on 07 Aug 2015

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.