Commit eb1e5048 authored by antoor's avatar antoor

Add terminal-cache features

增加终端缓存功能
parent f7a1178f
...@@ -136,15 +136,16 @@ class Terminal { ...@@ -136,15 +136,16 @@ class Terminal {
if (cmd === 'exit' || cmd === 'quit') { return this.cell.close() }; if (cmd === 'exit' || cmd === 'quit') { return this.cell.close() };
term.pause(); term.pause();
// 是否有缓存 // 是否有缓存
// 最后想了想,这个命令执行结果的缓存还是暂时不需要了吧 if ((this.opts.otherConf || {})['terminal-cache'] === 1) {
// let cacheTag = 'command-' + new Buffer(this.path + cmd).toString('base64'); let cacheTag = 'command-' + new Buffer(this.path + cmd).toString('base64');
// let cacheCmd; let cacheCmd;
// if (cacheCmd = this.cache.get(cacheTag)) { if (cacheCmd = this.cache.get(cacheTag)) {
// term.echo( term.echo(
// antSword.noxss(cacheCmd, false) antSword.noxss(cacheCmd, false)
// ); );
// return term.resume(); return term.resume();
// }; };
}
// 开始执行命令 // 开始执行命令
this.core.request( this.core.request(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment