why do we need to adjust value of timeToIdleSeconds and timeToLiveSeconds for system.form.cache in ehcache.xml on different environments and how to adjust them .
Form definitions are cached in run-time memory for better response times specially when request details are viewed
Form definition exists in run-time memory for certain duration based on configuration in a file called USMHOME/view/conf/ehcache.xml and It is controlled by the setting :
<cache name="system.form.cache" maxBytesLocalHeap="100M" eternal="false" overflowToDisk="false" timeToIdleSeconds="2" timeToLiveSeconds="2"/>
You can adjust the value of timeToIdleSeconds and timeToLiveSeconds accordingly to the different environments and for different needs
On Production Environment , Caching form definition is highly recommended for PRODUCTION deployment :
To enable Form caching for fast performance , follow the steps below
1. Open the file USMHOME/view/conf/ehcache.xml in a text editor
2. Locate the following line
<cache name="system.form.cache" maxBytesLocalHeap="100M" eternal="false" overflowToDisk="false" timeToIdleSeconds="2" timeToLiveSeconds="2"/>
3. Change the following values
timeToIdleSeconds to 86400
timeToLiveSeconds to 120000
4. Save the file
5. Restart catalog windows service for the change to effect
Please note :
The downside of form caching is that any change to form definition in form designer would not reflect in the request which is associated with that changed form , unless catalog service is restarted. Hence it is not recommended for environments where the form definition change frequently, for example , your development system . In other words , on your development , you can keep timeToIdleSeconds and timeToLiveSeconds as 2 ( default one ) so that you can see the changed form reflected in the request immediately while you develop/change the forms frequently .