IInMemManager.ClearCachedData

Syntax

ClearCachedData(CubeObject: IMetabaseObject);

ClearCachedData(CubeObject: Prognoz.Platform.Interop.Metabase.IMetabaseObject);

Parameters

CubeObject. Cube for which it is required to clear cached data.

Description

The ClearCachedData method removes all data linked to the specified cube from the cache.

Comments

On executing the method, data of all display versions and for all sets of cube parameters are deleted.

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;
    Cube: IMetabaseObject;
    InMem: IInMemManager;
Begin
    Mb := MetabaseClass.Active;
    Cube := Mb.ItemById(
"STD_CUBE").Bind;
    
// Manager to work with In-Memory cache
    InMem := New InMemManager.Create;
    
// Delete cached data
    InMem.ClearCachedData(Cube);
End Sub UserProc;

Public Shared Sub Main(Params: StartParams);
Var
    Mb: IMetabase;
    Cube: IMetabaseObject;
    InMem: InMemManager = 
New InMemManagerClass();
Begin
    Mb := Params.Metabase;
    Cube := Mb.ItemById[
"STD_CUBE"].Bind();
    
// Delete cached data
    InMem.ClearCachedData(Cube);
End Sub;

After executing the example, all cached data will be deleted from cache for the specified cube.

See also:

IInMemManager