feature(dom) getDataFromCache: add !hash

This commit is contained in:
coderaiser 2013-11-19 12:35:54 +00:00
parent 1d42aed7eb
commit b7d4277f6d

View file

@ -1798,15 +1798,18 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
else {
hash = Cache.get(name + '-hash');
DOM.loadCurrentHash(function(pHash) {
var data,
isContain = Util.isContainStr(hash, 'error');
if (!isContain && hash === pHash)
data = Cache.get(name + '-data');
Util.exec(callback, data);
});
if (!hash)
Util.exec(callback);
else
DOM.loadCurrentHash(function(pHash) {
var data,
isContain = Util.isContainStr(hash, 'error');
if (!isContain && hash === pHash)
data = Cache.get(name + '-data');
Util.exec(callback, data);
});
}
});
};