Caching in Mobile Forms or any solution for that matter, plays key role in the performance. On the other hand, cache takes finite space to store intermediate artifacts that means you trade memory for better performance. In Mobile Form solution, we have exposed different strategies of caching to fine tune this trade off. I’ll first describe all the levels and what do they mean and then how to change the levels.
Mobile Form has 3 different strategy of caching that can be controlled using the configuration.
|None||This cache strategy enforces the solution no to cache any artifact. This will, in practice, slow performance and high memory availability due to absense of cache.|
|Conservative||This cache strategy dictates to cache only those intermediate artifacts that are generated before the render of the form like template containing inlined fragments and images.|
|Aggressive||This cache strategy enforces the solution to cache almost everything that can be cached. This includes rendered html content besides all the artifacts from Conservative level. This should result in best performance but it will also consume more memory for storing all the cached artifacts.|
Aggressive caching strategy means you will get O(1) or constant time performance in rendering a form as rendered content of the form is cached.
The following section describes how to change the caching strategy based on you requirement:
- Go to http://[server]:[port]/lc/system/console/configMgr and look for “Forms Configuration” and click on it. You see a dialog like following:
- You can select Cache strategy using the drop down.
Besides Cache strategy, one can also configure total in memory cache size and the upper bound on the size of the individual artifacts to be cached. HTML Forms, as of now, only do in-memory caching using LRU strategy.
If you select ‘None’ cache strategy, the cache gets cleaned up.