UseDataCache: Boolean;
UseDataCache: Boolean;
The UseDataCache property determines whether data cache is used while working with the table.
If the property is set to True, data cache is used while working with the table. All the data, obtained from a source according to the given selection, falls into cache. In case of selection changing, the data is loaded from the cache. The missing data is extracted from a data source and it is also cached. Data cache exists until data source is open.
By default the property is set to False, and data is not cached.
NOTE. Data, obtained during aggregation on the server, is not cached.
Executing the example requires a form, two buttons on this form, the TabSheetBox component named TabSheetBox1, the UiErAnalyzer component named UiErAnalyzer1, and the ErAnalyzerDimPanel component named ErAnalyzerDimPanel1. An express report is connected to the UiErAnalyzer1 component.
Class TESTForm: Form
UiErAnalyzer1: UiErAnalyzer;
TabSheetBox1: TabSheetBox;
ErAnalyzerDimPanel1: ErAnalyzerDimPanel;
Button1: Button;
Button2: Button;
Pivot: IPivot;
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Begin
Pivot := (UiErAnalyzer1.Instance As IEaxAnalyzer).Pivot;
Pivot.UseDataCache := True;
End Sub Button1OnClick;
Sub Button2OnClick(Sender: Object; Args: IMouseEventArgs);
Begin
If Pivot <> Null Then
Pivot.FlushDataCache;
End If;
End Sub Button2OnClick;
End Class TESTForm;
After initiating the form, clicking the Button1 button activates data caching for the express report table. Clicking the Button2 button activates clearing of available cached data.
Executing the example requires a form, two buttons on this form, the TabSheetBoxNet component named TabSheetBoxNet1, the UiErAnalyzerNet component named UiErAnalyzerNet1, and the ErAnalyzerDimPanelNet component named ErAnalyzerDimPanelNet1. An express report is connected to the UiErAnalyzerNet1 component.
Imports Prognoz.Platform.Forms.Net;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Pivot;
Public Partial Class TESTForm: Prognoz.Platform.Forms.Net.ForeNetForm
Public Constructor TESTForm();
Begin
InitializeComponent();
End Constructor;
Pivot: IPivot;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Begin
Pivot := (UiErAnalyzerNet1.AnalyzerUi.Instance As IEaxAnalyzer).Pivot;
Pivot.UseDataCache := True;
End Sub;
Private Sub button2_Click(sender: System.Object; e: System.EventArgs);
Begin
If Pivot <> Null Then
Pivot.FlushDataCache();
End If;
End Sub;
End Class;
After initiating the form, clicking the Button1 button activates data caching for the express report table. Clicking the Button2 button activates clearing of available cached data.
See also: