CachingMode: MetabaseObjectCachingMode;
The CachingMode property sets caching mode.
Caching mode can be changed for dictionaries, including MDM dictionaries of any type.
Executing the example requires a dictionary with the 16009 key.
Add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
MDesc: IMetabaseObjectDescriptor;
MObj: IMetabaseObject;
Begin
MB := MetabaseClass.Active;
MDesc := MB.Item(16009);
MObj := MDesc.Edit;
MObj.CachingMode := MetabaseObjectCachingMode.FlushCacheByTimestamp;
MDesc.UpdateTimestamp;
MObj.Save;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Metabase;
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
MDesc: IMetabaseObjectDescriptor;
MObj: IMetabaseObject;
Begin
MB := Params.Metabase;
MDesc := MB.Item[16009];
MObj := MDesc.Edit();
MObj.CachingMode := MetabaseObjectCachingMode.mocmFlushCacheByTimestamp;
MDesc.UpdateTimestamp();
MObj.Save();
End Sub;
After executing the example the FlushCacheByTimestamp caching mode is set for the selected dictionary.
See also: