Skip to content

Commit

Permalink
Update Readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
A-312 authored Jul 11, 2019
1 parent 59572dd commit 3c6dccb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

$ npm install consolidate

## Supported Express version
## Supported Express versions

- [Espress 4.x](https://expressjs.com/fr/4x/api.html)
- [Express 3.x](https://expressjs.com/fr/3x/api.html)
Expand Down Expand Up @@ -115,7 +115,7 @@ cons.swig('views/page.html', { user: 'tobi' })

To enable caching simply pass `{ cache: true }`. Engines _may_ use this option to cache things reading the file contents, compiled `Function`s etc. Engines which do _not_ support this may simply ignore it. All engines that consolidate.js implements I/O for will cache the file contents, ideal for production environments.
When using consolidate directly: `cons.swig('views/page.html', { user: 'tobi', cache:true }, callback);`
Using Express or higher: `app.locals.cache = true` or set NODE_ENV to 'production' and Express will do this for you.
Using supported Express versions: `app.locals.cache = true` or set NODE_ENV to 'production' and Express will do this for you.

## Express example

Expand Down

0 comments on commit 3c6dccb

Please sign in to comment.