Cache is king

Cache plays a very important role in the performance of Mobile Form or for that matter any component. Mobile Form caches all the intermediate objects required to process (rendition or submission) a form on first request. It doesn’t cache the objects dependent on the data as they are very likely to change.

Mobile Form maintains two different levels of cache. The flow goes like this as depicted in the flow diagram:

1) From the request it picks up the template and resolves its fragments and images.

2) The resolved template (with referred fragment and images) along with the dependency list (of images and fragments) is store in the cache. This cache store is called PreRender Cache as it stores entities and artifacts generated before final rendering.

3) Now this resolved template is used to generate the  rendered content like HTML and stored in the cache again. This cache store is called Rendered Cache and it stores rendered content.


Mobile Form doesn’t cache the templates that have missing references to fragments or images. So if you notice Mobile Form is taking way too much time, then please check the server logs if there are missing reference warning.

Another reason for ignoring artifacts for cache is the size of the object. In fact, one can configure the maximum size of the object that is to be cached. Please refer to Mobile Form Configuration post for more details.

The Mobile Form admin should configure the Cache size and max object size based on the requirements. We have test data that shows cached rendering is as much as 1000 times faster than non cached rendering. So please make sure all your important forms are using cache.