Skip to content

Commit

Permalink
release 0.5.2
Browse files Browse the repository at this point in the history
change default options
  • Loading branch information
hefangshi committed Jun 4, 2016
1 parent e928839 commit 9d6784f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ EngineStream.prototype._read = function() {
*/
var SwigWrap = module.exports = function SwigWrap(app, options) {
options.renderCacheOptions = options.renderCacheOptions || {};
var max = options.renderCacheOptions.max || 1000;
var pruneRate = options.renderCacheOptions.pruneRate || 10;
var max = options.renderCacheOptions.max || 20 * 1024 * 1024;
var pruneRate = options.renderCacheOptions.pruneRate || 1;
var renderCaches = LRU({
max: max,
length: function(n, key) {
Expand Down Expand Up @@ -118,7 +118,6 @@ var SwigWrap = module.exports = function SwigWrap(app, options) {
return renderCaches.set(key, value);
},
clean: function() {
console.log('items', renderCaches.itemCount, renderCaches.length);
renderCaches.reset();
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yog-swig",
"version": "0.5.1",
"version": "0.5.2",
"description": "custom swig template, add some tag or filter ",
"main": "index.js",
"directories": {
Expand Down

0 comments on commit 9d6784f

Please sign in to comment.