Hibernate Session Caching Configuration for Save Collection Sheet
CollectionSheetServiceImpl saveCollectionSheet executes the following:
new SaveCollectionSheetSessionCache().loadSessionCacheWithCollectionSheetData(saveCollectionSheet, branchId,searchId)
Like Seinfeld this appears to do absolutely nothing. However, it does preload whatever data it can into Hibernate Session Cache so that (if in cache) a database request is not needed. This is quite relevant for collection sheets because of their bulk nature. If a collection sheet has 60 clients then lots of individual checks to customers, accounts, schedules and fees are requested. This reduction in database requests has been shown to help... especially in concurrent testing (not by 60 fold but perhaps 2/3 fold).
However, it does introduce an additional maintenance burden. If major changes are made to the way collection sheets and/or accounts are processed then the 'caching' queries will likely be affected.
This caching can be enabled or disabled by setting the configuration property GeneralConfig.allowDataPrefetchingWhenSavingCollectionSheets to true / false (default is true). This will allow performance testing to be done with and without caching. Also, if it is believed caching is causing a problem in production it can be turned off.