Skip to content

Commit e484cc8

Browse files
authored
修复禁用缓存也会写入缓存文件的BUG (#1)
* 修复禁用缓存也会写入缓存文件的BUG * 1.3.9
1 parent 6f1d5cc commit e484cc8

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/layout.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,10 @@ class Layout {
103103
result += this.core._parse(content);
104104
}
105105

106-
// 写入缓存(异步)
107-
this.writeCache(cacheFilename, result);
106+
if (options.cache) {
107+
// 写入缓存(异步)
108+
this.writeCache(cacheFilename, result);
109+
}
108110

109111
callback(null, result);
110112
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cb-template",
3-
"version": "1.3.8",
3+
"version": "1.3.9",
44
"description": "唱吧模板引擎",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)