org.springframework.cache.transaction

Class AbstractTransactionSupportingCacheManager

    • Constructor Detail

      • AbstractTransactionSupportingCacheManager

        public AbstractTransactionSupportingCacheManager()
    • Method Detail

      • setTransactionAware

        public void setTransactionAware(boolean transactionAware)
        Set whether this CacheManager should expose transaction-aware Cache objects.

        Default is "false". Set this to "true" to synchronize cache put/evict operations with ongoing Spring-managed transactions, performing the actual cache put/evict operation only in the after-commit phase of a successful transaction.

      • isTransactionAware

        public boolean isTransactionAware()
        Return whether this CacheManager has been configured to be transaction-aware.
      • decorateCache

        protected Cache decorateCache(Cache cache)
        Description copied from class: AbstractCacheManager
        Decorate the given Cache object if necessary.
        Overrides:
        decorateCache in class AbstractCacheManager
        Parameters:
        cache - the Cache object to be added to this CacheManager
        Returns:
        the decorated Cache object to be used instead, or simply the passed-in Cache object by default