Commit 0191b00e authored by Medicean's avatar Medicean

v2.0-beta::filemanager cache manager, use cache default. #64 #52

parent 6ad3731f
......@@ -169,6 +169,7 @@ module.exports = {
otherConf: {
nohttps: 'Ignore HTTPS certificate',
terminalCache: "Use the terminal's cache",
filemanagerCache: "Use the filemanager's cache",
requestTimeout: 'Request timeout',
commandPath: 'Custom terminal-execPath'
}
......
......@@ -170,6 +170,7 @@ module.exports = {
otherConf: {
nohttps: '忽略HTTPS证书',
terminalCache: '虚拟终端使用缓存',
filemanagerCache: '文件管理使用缓存',
requestTimeout: '请求超时',
commandPath: '自定义终端执行路径'
}
......
......@@ -141,7 +141,7 @@ class FileManager {
// if (cache = this.cache[path]) {
// return callback(cache);
// };
if (cache = this.cache.get(cache_tag)) {
if ((this.opts.otherConf || {})['filemanager-cache'] !== 0 && (cache = this.cache.get(cache_tag))) {
return callback(JSON.parse(cache));
};
......
......@@ -276,6 +276,7 @@ class Form {
const opt = Object.assign({}, {
'ignore-https': 0,
'terminal-cache': 0,
'filemanager-cache': 1,
'request-timeout': '10000',
'command-path': ''
}, arg.otherConf);
......@@ -290,6 +291,9 @@ class Form {
type: "checkbox", name: 'terminal-cache', label: LANG['list']['otherConf']['terminalCache'],
checked: opt['terminal-cache'] === 1
}, {
type: "checkbox", name: 'filemanager-cache', label: LANG['list']['otherConf']['filemanagerCache'],
checked: opt['filemanager-cache'] === 1
},{
type: "label", label: LANG['list']['otherConf']['requestTimeout']
}, {
type: "combo", label: '/ms', inputWidth: 100, name: "request-timeout",
......
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