FlushInstance(Value: IMetabaseObjectParamValues): Boolean;
FlushInstance(Value: Prognoz.Platform.Interop.Metabase.IMetabaseObjectParamValues): boolean;
Value. Values of parameters of an object.
The FlushInstance method flushes cached data of an object by specified parameter values.
FlushInstance returns True if cache flushing is successful.
This method use increases productivity while working with objects that have parameters, for example: cube that controls parameters of its dimensions. If the FlushInstance method is used while opening the cube cache flushing is possible by chosen dimension, not by all.Use the IMetabaseObject.FlushInstances method to flush cached data of an object.
Executing the example requires that the repository contains a parameterized table dictionary with the OBJ_TBL_DICT identifier. The first parameter of this dictionary must be of real type.
Add a link to the Metabase system assembly.
Sub UserSub;
Var
Mb: IMetabase;
Obj: IMetabaseObject;
ParamVals: IMetabaseObjectParamValues;
Begin
Mb := MetabaseClass.Active;
Obj := Mb.ItemById("OBJ_TBL_DICT").Bind;
ParamVals := Obj.Params.CreateEmptyValues;
ParamVals.Item(0).Value := 66;
Obj.FlushInstance(ParamVals);
End Sub UserSub;
After executing this example the cache of the table dictionary is cleared only by the first parameter.
See also: