Form Caching feature in ehcache.xml and its impact
search cancel

Form Caching feature in ehcache.xml and its impact

book

Article ID: 9946

calendar_today

Updated On:

Products

CA Service Catalog CA Service Management - Asset Portfolio Management CA Service Management - Service Desk Manager

Issue/Introduction

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 

Environment

Service Catalog 12.9 CP2 and later

Resolution

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

Additional Information

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 .