0.0.6 • Published 6 years ago

prerender-cache-mongodb v0.0.6

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

prerender-mongo-cache

Prerender cache plugin using mongodb with ability to invalidate by queryparams Plugin works with https://github.com/prerender/prerender.

Description

Plugin store all prerendered pages in MongoDB instanse. New collection created for each domain. Each page saved with url path for further ability to invalidate it.

Instalation

$ npm install prerender-cache-mongodb --save

Then add it to plugins in server.js:

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

Usage

By default plugin will use path: mongodb://localhost:27017/prerender. You can override it with MONGO_PRERENDER_URL environment variable.
You can invalidate saved pages by query params:

?invalidate=page - will invalidate one document with given url address
?invalidate=all - will invalidate all documents in collection with page hostname

For example:

https://github.com/baterson/master?readme=1&invalidate=page  

Wil invalidate page https://github.com/baterson/master?readme=1 in collection github.com

https://github.com/baterson/master?readme=1&invalidate=all  

Will remove all documents from collection github.com

0.0.6

6 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago