cli - cache quick bugfix
This commit is contained in:
parent
c85b0deea7
commit
222224ee4c
@ -22,24 +22,24 @@ module.exports = {
|
||||
vorpal.exec('cache --help');
|
||||
}
|
||||
else if(action == 'flush') {
|
||||
if(typeof global['app'].cache[type] !== "undefined") {
|
||||
global['app'].cache[type] = {};
|
||||
if(typeof global['gds'].cache[type] !== "undefined") {
|
||||
global['gds'].cache[type] = {};
|
||||
console.log(type+' cache flush');
|
||||
} else if(type == 'all') {
|
||||
global['app'].cache = {};
|
||||
global['gds'].cache = {};
|
||||
console.log('full cache flush');
|
||||
}
|
||||
else vorpal.exec('cache --help');
|
||||
}
|
||||
else if(action == 'get') {
|
||||
console.log(Object.keys(global['app'].cache));
|
||||
console.log(Object.keys(global['gds'].cache));
|
||||
console.log(type);
|
||||
console.log(type in Object.keys(global['app'].cache));
|
||||
console.log(Object.keys(global['app'].cache).hasOwnProperty(type));
|
||||
if(typeof global['app'].cache[type] !== "undefined") {
|
||||
console.log(JSON.stringify(global['app'].cache[type]));
|
||||
console.log(type in Object.keys(global['gds'].cache));
|
||||
console.log(Object.keys(global['gds'].cache).hasOwnProperty(type));
|
||||
if(typeof global['gds'].cache[type] !== "undefined") {
|
||||
console.log(JSON.stringify(global['gds'].cache[type]));
|
||||
} else if(type == 'all'){
|
||||
console.log(JSON.stringify(global['app'].cache));
|
||||
console.log(JSON.stringify(global['gds'].cache));
|
||||
} else {
|
||||
console.log("The cache \""+type+"\" doesnt exists.");
|
||||
vorpal.exec('cache --help');
|
||||
|
Loading…
x
Reference in New Issue
Block a user