When Is the Cache Used? (Magic xpa 2.x)
Data can be read from the cache only when Magic xpa does not need to issue a lock for the row. The need for a lock is determined by the following three factors.
-
The Locking strategy, defined under the Data tab of the Task Properties dialog box.
-
The Cache strategy, defined under the Data tab of the Task Properties dialog box.
-
The definition of the Access and Share modes (in the Main Source Properties sheet) with which the table was opened.
A lock is issued only for tables that are opened with write access and share. The timing of the lock is determined by the locking strategy.
Moving from Query mode to Modify mode, and from Modify mode to Query mode, is performed using the cache. The records in view when switching modes are not refreshed.
A Sort operation automatically creates caches for the sort file.
When accessing Create mode, or when User Locate, User Range, or Sort operations are taking place, the cache is released.
Toggling between Modify and Query modes causes Magic xpa to access the cache and eliminates the need to re-fetch data from the database.