Browse Source

[core] Fix assist panel caching

Johan Ahlen 10 years ago
parent
commit
fe0b968
1 changed files with 5 additions and 0 deletions
  1. 5 0
      desktop/core/src/desktop/static/desktop/js/assistHelper.js

+ 5 - 0
desktop/core/src/desktop/static/desktop/js/assistHelper.js

@@ -219,6 +219,11 @@
         snippet: ko.mapping.toJSON(snippet.getContext())
         snippet: ko.mapping.toJSON(snippet.getContext())
       }, function (data) {
       }, function (data) {
         if (data.status == 0) {
         if (data.status == 0) {
+          cachedData[url] = {
+            timestamp: (new Date()).getTime(),
+            data: data
+          };
+          $.totalStorage("hue.assist." + self.getTotalStorageUserPrefix(), cachedData);
           successCallback(data);
           successCallback(data);
         } else {
         } else {
           errorCallback(data);
           errorCallback(data);