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 an on-deck set of caches with data from the next DataSource
. Then, when the switch occurs and Repository receives a SwitchingDataSourceEvent
of type SWITCH from the SwitchingDataSource
, the caches are not flushed; instead, the on-deck caches go live. This can improve performance during and immediately after a database switchover.