IInMemManager.PrepareMatrix

Syntax

PrepareMatrix(Dest: ICubeInstanceDestination): IMatrix;

Parameters

Dest. Built cube display version.

Description

The PrepareMatrix method builds matrix that will be saved to the cache for the specified cube display option.

Comments

If cache contains already cached matrix with data for the specified cube display version, it will be rebuilt. Because of implementation particularity, the method returns empty matrix which structure corresponds to data source structure.

Example

Executing the example requires that the repository contains a cube with the STD_CUBE identifier. The repository uses In-Memory caching mechanism.

Add links to the Cubes and Metabase system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    CubeInst: ICubeInstance;
    DestInst: ICubeInstanceDestination;
    InMem: IInMemManager;
Begin
    Mb := MetabaseClass.Active;
    
// Open cube
    CubeInst := Mb.ItemById("STD_CUBE").Open(NullAs ICubeInstance;
    DestInst := CubeInst.Destinations.DefaultDestination;
    
// Manager to work with In-Memory cache
    InMem := New InMemManager.Create;
    InMem.PrepareMatrix(DestInst);
End Sub UserProc;

On executing the example the cache updates all data of the specified cube.

See also:

IInMemManager