Skip to content

Commit

Permalink
store $ZMI.getCachedValue in localStorage (KKI)
Browse files Browse the repository at this point in the history
svn path=/ZMS/branches/zms4/; revision=5913
  • Loading branch information
zmsdev committed Oct 26, 2020
1 parent fcf4627 commit 5a5d3de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Products/zms/plugins/www/zmi.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ ZMI.prototype.getLangStr = function(key, lang) {
/**
* Cache Ajax requests.
*/
ZMI.prototype.getCachedValue = function(k) {return localStorage["zmiCache["+k+"]"];}
ZMI.prototype.setCachedValue = function(k,v) {localStorage.setItem("zmiCache["+k+"]",v);return v;}
ZMI.prototype.getCachedValue = function(k) {var v = localStorage["zmiCache["+k+"]"]; return typeof v=='undefined'?v:JSON.parse(v);}
ZMI.prototype.setCachedValue = function(k,v) {localStorage.setItem("zmiCache["+k+"]",JSON.stringify(v));return v;}

/**
* Returns request-property.
Expand Down

0 comments on commit 5a5d3de

Please sign in to comment.