IMetabaseCache.FlushById

Syntax

FlushById(Id: String): Boolean;

Parameters

Id. Repository object identifier.

Description

The FlushById method flushes links of repository object by its identifier.

Comments

The method returns True if flush succeeded.

Example

Executing the example requires that the repository contains a parametric dictionary with the PARAM_DICT identifier. The dictionary contains a parameter with the ITEM identifier that influences element filtering.

Sub UserProc;
Var
    Mb: IMetabase;
    currObj: IMetabaseObject;
    currPar: IMetabaseObjectParamValues;
    currDimInst: IDimInstance;
    currEls: IDimElements;
Begin
    Mb := MetabaseClass.Active;
    Debug.WriteLine("Open dictionary with the '0' parameter");
    currObj := Mb.IteMbyId("PARAM_DICT").Bind;
    currPar := currObj.ParamValues;
    currPar.FindById("ITEM").Value := 0;
    currDimInst := currObj.Open(currPar) As IDimInstance;
    currEls := currDimInst.Elements;
    Debug.WriteLine("Number of elements: " + currEls.Count.ToString);
    Debug.WriteLine("Open dictionary with the '10' parameter");
    Mb.Cache.FlushById("PARAM_DICT");
    currPar.FindById("ITEM").Value := 10;
    currDimInst := currObj.Open(currPar) As IDimInstance;
    currEls := currDimInst.Elements;
    Debug.WriteLine("Number of elements: " + currEls.Count.ToString);
End Sub UserProc;

After executing the example the dictionary is opened with different parameter values. The console window displays the number of dictionary elements after filtering.

See also:

IMetabaseCache