Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

opticache

punchcard-cms4Apache-2.01.0.2

Automated optimized routing cache Express middleware

express, middleare, cache, punchcard-cms

readme

OptiCache Build Status Coverage Status

Express middleware to statically cache renders as HTML in your public folder, optimized through critical and html-minifier.

Installation and Usage

npm i opticache --save

const express = require('express');
const opticache = require('opticache');

const app = express();

// Add Express static folder
app.use(express.static('public'));
// Add Opticache to all routes (can be added individually too)
app.use(opticache({
  public: 'public',
}));

Options

  • public - The public folder that Express serves as a static
  • minify - html-minifer configuration options