- No caching – not preferred, unless you have a compelling reason
- 'CacheDataMethod’ property on form controls
- Add a call to ‘cacheAddMethod’ in FormDataSource’s init method
- Add the ‘SysClientCacheDataMethodAttribute’ to the display method – even though the compiler will allow you to put this attribute on any display method, it only actually works on display methods that are defined on a table (not on forms, data sources, or classes)
- Custom caching mechanism -- code it yourself
Use the attached flowchart to determine the correct caching strategy for your scenario.
Edit methods should be cached using the same strategy.
Always set the updateOnWrite parameter to true when you’re adding the SysClientCacheDataMethodAttribute, or calling cacheAddMethod on a form data source. In certain situations it would be better not to refresh during updates (like in forms where the table in question is used as a read-only data source), however this approach often leads to the introduction of errors when other developers/parties customize the method or add it to new forms where conditions are different.
Always set the updateOnWrite parameter to true when you’re adding the SysClientCacheDataMethodAttribute, or calling cacheAddMethod on a form data source. In certain situations it would be better not to refresh during updates (like in forms where the table in question is used as a read-only data source), however this approach often leads to the introduction of errors when other developers/parties customize the method or add it to new forms where conditions are different.
No comments:
Post a Comment