Connection mondrianConnection = smdt.getConnection();
// retrieves CacheControl object
CacheControl cacheControl = mondrianConnection.getCacheControl(null);
// retrieves the MDX query
MdxQuery mdxQuery = (MdxQuery) olapModel.getExtension("mdxQuery");
Query mondrianQuery = mondrianConnection.parseQuery(mdxQuery.getMdxQuery());
// finds the cube in the MDX query
Cube cube = mondrianQuery.getCube();
// flush cache on all measures for that cube
CacheControl.CellRegion measuresRegion = cacheControl.createMeasuresRegion(cube);
cacheControl.flush(measuresRegion);