proxycache
A simple, configurable, Redis-powered caching proxy.
Use it when you want to
- deliver a URL to a static file
- cache the file somewhere
- provide a URL to the cached version for subsequent requests
Install
$ npm install --save proxycache
Example
const express = const request = const proxycache = // Create Redis/Cloud Storage proxycache clientconst config = store: client: 'redis' connection: {} cache: client: 'gcloud' connection: keyFilename: './gcloud-key.json' projectId: 'my-project-id' options: bucket: 'images' let cache // Image server to proxy forconst imgsrv = imgsrvimgsrvconsole const render = `<html> <head> <title>bfm</title> </head> <body> <img src='' height=500 width=500/> </body></html>` // API Serverconst app = appapp
API
proxycache(options)
options
Type: object
License
MIT © Forrest Desjardins