-
Enhancement
-
Resolution: Done
-
Major
-
6.0.2.Final, 7.1.0.Final
-
None
Currently writes to a cache store are performed individually for each modification to the cache.
While this makes sense when using a non-tx cache it would be beneficial to support writing multiple modifications to a cache store in a single call when using a Tx cache.
Currently all writes are performed in the commit phase and are done by looping through the modifications in the Tx and writing each one in turn to the the store.
Instead of doing this it would useful to pass all modifications to the store in a single call, this would allow:
a) Taking advantage of support for batch updates in underlying stores (JDBC, MongoDB, DynamoDB) for a more efficient write through.
b) Allow store implementations the chance to clean up if one or more updates in the batch fail (this is especially useful if the store does not support Tx and rollbacks as it means the store implementation can at least try to clean up any partial updates it has performed, something which is not currently possible).