IMetabaseObjectCache.Put

Syntax

Put(Instance: IMetabaseObjectInstance);

Parameters

Instance - instance of an object that is necessary to put in cache.

Description

The Put method creates a new record in cache and puts there a specified instance of an object.

Comments

Records for objects opened with different parameters values are created in cache. If in cache there is a record for the same parameters that were used to get an instance of the Instance object when executing the Put method this record is updated.

Example

Executing this example requires that the repository contains a regular report with the Report_1 identifier.

Sub UserProc;
Var
    MB: IMetabase;
    MDesc: IMetabaseObjectDescriptor;
    Cache: IMetabaseObjectCache;
    Params: IMetabaseObjectParamValues;
Begin
    MB := MetabaseClass.Active;
    MDesc := MB.ItemById("Report_1");
    Params := MDesc.Params.CreateEmptyValues;
    Params.FindById("Param_1").Value := 2000;
    Params.FindById("Param_2").Value := 2003;
    Cache := MDesc.Cache;
    Cache.Put(MDesc.Open(Params));
End Sub UserProc;

After executing the example a new record is created in cache of a regular report.

See also:

IMetabaseObjectCache