ICubeInstanceDestination.FlushCache

Syntax

FlushCache;

Description

The FlushCache method clears cache of the opened cube instance.

Comments

Caching provides a possibility to reduce loading time and provides quicker access to some data. If source data does not correspond to cached data, the cache clearing is required.

Example

A cube with the CUBE_WDI identifier is supposed to be in the repository.

To execute the example, add links to the Metabase and 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 the cache of the cube with the CUBE_WDI identifier will be cleared.

See also:

ICubeInstanceDestination