3.0.2 • Published 3 years ago

prerender-level-cache v3.0.2

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

prerender-level-cache

Prerender plugin for level caching, to be used with the prerender node application from https://github.com/prerender/prerender.

How it works

This plugin will store all prerendered pages into LevelDB.

How to use

In your local prerender project run:

$ npm install prerender-level-cache

Then in the server.js that initializes the prerender:

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

Features

Ttl

It uses a default ttl of 2 months, but that can be overridden by setting a different value in prerender server.options.ttl.

Refresh

You can force a refresh from another plugin by setting req.refresh = true

Exemple:

// in another plugin placed before prerender-level-cache
module.exports = {
  requestReceived: (req, res, next) => {
    req.refresh = true
    next()
  }
}

Alternatively, you can delete the cache directly in the LevelDB database, using a tool such as lev2.

Level-party

The plugin uses the level-party module to get over the level multi-process restrictions.

3.0.2

3 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.1.1

4 years ago

2.2.0

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago