Explain caching better in Readme.md #114

Open
wants to merge 1 commit into
from

Projects

None yet

4 participants

@jschall
jschall commented Jun 23, 2013

No description provided.

was just looking for exactly this. thanks! 👏

Pana commented Apr 7, 2014

+1

@BridgeAR BridgeAR commented on the diff Jan 20, 2016
Readme.md
@@ -72,14 +72,8 @@ cons[name]('views/page.html', { user: 'tobi' }, function(err, html){
## Caching
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.
-
-```js
-var cons = require('consolidate');
-cons.swig('views/page.html', { user: 'tobi' }, function(err, html){
- if (err) throw err;
- console.log(html);
-});
-```
+ When using consolidate directly: `cons.swig('views/page.html', { user: 'tobi', cache:true },callback);`
BridgeAR
BridgeAR Jan 20, 2016 Collaborator

Missing space before callback

Collaborator

@jschall would you be so kind and rebase this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment