CachingMode: MetabaseObjectCachingMode;
CachingMode: Prognoz.Platform.Interop.Metabase.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;
After executing the example the FlushCacheByTimestamp caching mode is set for the selected dictionary.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
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;
See also: