GUI / http-stale-cache-proxy

A non-compliant HTTP caching proxy that excels at serving stale cached content, while keeping its cache updated asynchronously.
MIT License
15 stars 5 forks source link

http-stale-cache-proxy

A non-compliant HTTP caching proxy that excels at serving stale cached content, while keeping its cache updated asynchronously.

The basic behavior of this proxy is:

The use case for this is to serve up cached content for unreasonably slow backend servers where stale content may be okay. Each time a request is made, the user receives the last cached response. Each request made also asynchronously refresh the cache. This generally means that after the first request, the user is always receiving the cached response for the previously made request.

Usage

var httpStaleCacheProxy = require('http-stale-cache-proxy');

httpStaleCacheProxy.createServer({
  changeOrigin: true,
  noRefresh: false,
  target: {
    host: 'example.com',
    port: 80,
  },
}).listen(8000);

Options

Why another proxy?

What's the point of this when there's plenty of other great caching servers available?