Well, you can use the following APIs to clear the cube cache
mondrian.olap.CacheControl cacheControl = connection.getCacheControl(null); mondrian.olap.Schema schema = connection.getSchema(); mondrian.olap.Cube cube = schema.lookupCube(cubeName, false); mondrian.olap.CacheControl.CellRegion cellRegion = cacheControl.createMeasuresRegion(cube); cacheControl.flush(cellRegion);
Or you can clear the schema cache
cacheControl.flushSchemaCache();
Alternatively, please read this document for more details.
source share