Skip to content

Latest commit

 

History

History
36 lines (20 loc) · 1021 Bytes

File metadata and controls

36 lines (20 loc) · 1021 Bytes

prerender-memjs-cache

Fork of prerender plugin for memjs caching by lammertv, to be used with the prerender node application from https://github.com/prerender/prerender.

How it works

As original plugin, this fork will store all prerendered pages into a memcache service using memjs client. But this fork also extends the original plugin with expiration functionality.

How to use

In your local prerender project run:

$ npm install hooke/prerender-memjs-cache --save

Then in the server.js that initializes the prerender:

server.use(require('prerender-memjs-cache'));

Set the page's time-to-live value in your environment:

export PAGE_TTL=3600

Configuration

The plugin uses the memjs module. It's configuration is explained at https://github.com/alevy/memjs/blob/master/README.md.

TODO

possibility to set page TTL on each caching operation