2.0.2 • Published 2 years ago

prerender-multidomain-disk-cache v2.0.2

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
2 years ago

prerender-multidomain-disk-cache

This is a plugin for prerender.io providing caching on disk. It is a fork of legalnavigator/prerender-disk-cache.

Requires:

  • node >= 4.0
  • prerender >= 5.0.0

How it works

This plugin will store all prerendered pages into a filesystem hierarchy including the server host name. For example:

How to use

The package is available on npm. Thus, in your local prerender project simply run:

$ npm install prerender-multidomain-disk-cache --save

Then in the server.js that initializes prerender:

server.use(require('prerender-multidomain-disk-cache'));

Configuration

Optionally, define some env variables:

export CACHE_ROOT_DIR=/your/directory/for/cache
export CACHE_LIVE_TIME=10000 (in seconds)
  • CACHE_ROOT_DIR defaults to os.tmpdir()/prerender-cache
  • CACHE_LIVE_TIME defaults to 3600 (1 hour)
2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago