Microsoft Dynamics AX database record caching is a performance-enhancing feature that helps avoid database access when it's not strictly necessary. Retrieving database records from memory instead of the database significantly speeds up data access. Caching can reduce the performance penalty for repetitively accessing the same database records.
For an in-depth look at caching and its affect on performance, see Greef, Pontoppidan, et al. 2006. Inside Microsoft Dynamics AX 4.0. 427-461. Redmond: Microsoft Press.
Caching is transparent to the application; however, it's important to know how caching works to optimize its performance in Microsoft Dynamics AX. Following are the types of caching:
Single-record caching has the following characteristics:
Defined at design time
Moves records to the cache based on the table's CacheLookup property and the type of SELECT statement that is used to retrieve the record
For more information about record caching, see Single-Record Caching.
Set-based caching has the following characteristics:
Defined either at design time or in X++ code
Moves sets of records to the cache
Implemented either through the table's CacheLookup property or in code by using the RecordViewCache class
For more information about caching sets of records, see Set-Based Caching.