FlushCache;
The FlushCache method clears cache of the opened cube instance.
Caching allows for reducing loading time and provides quicker access to some data. If source data does not correspond to cached data, cache clearing is required.
Executing the example requires that the repository contains a cube with the CUBE_WDI identifier.
Add links to the Metabase, Cubes system assemblies.
Sub UserProc;
Var
MB: IMetabase;
CubeInst: ICubeInstance;
CubeInstDest: ICubeInstanceDestination;
Begin
MB := MetabaseClass.Active;
CubeInst := MB.ItemById("CUBE_WDI").Open(Null) As ICubeInstance;
CubeInstDest := CubeInst.Destinations.DefaultDestination;
CubeInstDest.UpdateCache;
Debug.WriteLine(CubeInstDest.Cached);
CubeInstDest.FlushCache;
Debug.WriteLine(CubeInstDest.Cached);
End Sub UserProc;
After executing the example, clears the specified cube cache is cleared.
See also: