API call clearXMLACache

Data source

by Flexmonster Pivot Table

HTML

<script src="https://cdn.flexmonster.com/flexmonster.js"></script>

<button onclick="clearXMLACache()">clear XMLA Cache</button>

<div id="pivot-container"></div>

CSS

@import url(https://cdn.flexmonster.com/assets/jsfiddle-styles.css);

JavaScript

let pivot = new Flexmonster({
  container: "pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  toolbar: true,
  report: {
    dataSource: {
      dataSourceType: "microsoft analysis services",
      proxyUrl: "https://olap.flexmonster.com/olap/msmdpump.dll",
      catalog: "Adventure Works DW Standard Edition",
      cube: "Adventure Works",
    }
  }
});

function clearXMLACache() {
  clearCache();
}

function clearCache() {
  pivot.clearXMLACache(
    // replace with your proxyUrl
    "https://olap.flexmonster.com/olap/msmdpump.dll",
    // replace with DatabaseID
    "Adventure Works DW 2008",
    function(res) {
      // check response
      console.log(res);
    }
  );
}