We are using the caching es repository ( axon 2.4.3) and discovered that it evicts an aggregate from the cache on any Exception during command processing.
Since we use exceptions to abort processing (e.g. if the business rule validation fails) this presents somewhat of an issue as subsequent requests will hit the db.
While I understand why it would be necessary to evict from the cache for some exceptions e.g. optimistic lock etc.
Should it really evict for all exceptions?
It doesn't look like there is a way to parameterize this behaviour. Any suggestions other than copying and modifying the axon implem?