Browse Source

HUE-8528 [frontend] Temporarily disable namespace caching

We currently always fetch the computes which can cause a mismatch with the cached namespaces. This will disable the namespace cache until we can figure out a clean solution.
Johan Ahlen 7 years ago
parent
commit
628ad2d2ae
1 changed files with 6 additions and 0 deletions
  1. 6 0
      desktop/core/src/desktop/static/desktop/js/contextCatalog.js

+ 6 - 0
desktop/core/src/desktop/static/desktop/js/contextCatalog.js

@@ -33,6 +33,7 @@ var ContextCatalog = (function () {
   var CONTEXT_CATALOG_VERSION = 4;
   var NAMESPACES_CONTEXT_TYPE = 'namespaces';
   var COMPUTES_CONTEXT_TYPE = 'computes';
+  var DISABLE_CACHE = true;
 
   var ContextCatalog = (function () {
 
@@ -64,6 +65,11 @@ var ContextCatalog = (function () {
     ContextCatalog.prototype.getSaved = function (contextType, sourceType) {
       var self = this;
       var deferred = $.Deferred();
+
+      if (DISABLE_CACHE) {
+        return deferred.reject().promise();
+      }
+
       self.getStore().getItem(sourceType + '_' + contextType).then(function (saved) {
         if (saved && saved.version === CONTEXT_CATALOG_VERSION) {
           deferred.resolve(saved.entry);