If you set the cacheSwitchHot property of the repository component to true, when the repository receives a SwitchingDataSourceEvent of type PREPARE from the SwitchingDataSource, it prepopulates off-line caches with data from the next DataSource. Then, when the switch occurs and the repository receives a SwitchingDataSourceEvent of type SWITCH from the SwitchingDataSource, the caches are not flushed; instead, the off-line caches go live. This can improve performance during and immediately after a database switchover.

 
loading table of contents...