SaveCube(Cube: IMetabaseObject);
Cube. The cube, which cache must be saved.
The SaveCache method saves cache for the specified variant of cube layout by the specified parameters.
Executing the example requires a cube with the D_SEP identifier and a database with the DB identifier. The cube must have the possibility for data caching.
Sub UserProc;
Var
MB: IMetabase;
MObj: IMetabaseObjectDescriptor;
CacheSaver: ICubeCacheSaver;
CrInfo: IMetabaseObjectCreateInfo;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("D_SEP");
CrInfo := MB.CreateCreateInfo;
CrInfo.ClassId := MetabaseObjectClass.KE_CLASS_CUBE_CACHE_SAVER;
CrInfo.Parent := MObj;
CrInfo.Permanent := True;
CacheSaver := MB.CreateObject(CrInfo).Edit As ICubeCacheSaver;
CacheSaver.Database := MB.ItemById("DB").Bind As IDatabase;
(CacheSaver As IMetabaseObject).Save;
CacheSaver.SaveCube(MObj.Bind);
End Sub UserProc;
After executing the example cube data will be cached with default parameters.
See also: