Display Method Caching
Hossein.K
6,642
Caching display methods improves the performance of display functions if they
are calculated on the AOS and improves performance when records are
transferred from the server to the client.
Only methods that are explicitly added to the cache are affected by the new
caching mechanism. To sign up a method for caching, the method
cacheAddMethod on the form data source should be called after super() in the
init method of the data source.
The call to cacheAddMethod also determines how frequently the cached display
method value is updated. The value is filled in upon fetching data from the backend, and it is refreshed when reread is called on the data source. Additionally, by
default, the display method values are also updated when the record is written to
the database. But that can be changed using the _updateOnWrite parameter in the
cacheAddMethod.
Only display methods that are of display type can be cached. Edit methods
cannot be cached. Only display methods placed on the table, can be cached.
One example of the initialization is found in \Forms\PurchTable\Data
Sources\PurchLine\Methods\init.
Display methods not based on cached data, are candidates for display method
caching.
Best Regards,
Hossein Karimi
are calculated on the AOS and improves performance when records are
transferred from the server to the client.
Only methods that are explicitly added to the cache are affected by the new
caching mechanism. To sign up a method for caching, the method
cacheAddMethod on the form data source should be called after super() in the
init method of the data source.
The call to cacheAddMethod also determines how frequently the cached display
method value is updated. The value is filled in upon fetching data from the backend, and it is refreshed when reread is called on the data source. Additionally, by
default, the display method values are also updated when the record is written to
the database. But that can be changed using the _updateOnWrite parameter in the
cacheAddMethod.
Only display methods that are of display type can be cached. Edit methods
cannot be cached. Only display methods placed on the table, can be cached.
One example of the initialization is found in \Forms\PurchTable\Data
Sources\PurchLine\Methods\init.
1 | purchLine_ds.cacheAddMethod(tablemethodstr(PurchLine, |
Display methods not based on cached data, are candidates for display method
caching.
Best Regards,
Hossein Karimi
*This post is locked for comments