public abstract class AbstractTransactionSupportingCacheManager
extends org.springframework.cache.support.AbstractCacheManager
setTransactionAware(boolean)
bean property.setTransactionAware(boolean)
,
TransactionAwareCacheDecorator
,
TransactionAwareCacheManagerProxy
Constructor and Description |
---|
AbstractTransactionSupportingCacheManager() |
Modifier and Type | Method and Description |
---|---|
protected org.springframework.cache.Cache |
decorateCache(org.springframework.cache.Cache cache) |
boolean |
isTransactionAware()
Return whether this CacheManager has been configured to be transaction-aware.
|
void |
setTransactionAware(boolean transactionAware)
Set whether this CacheManager should expose transaction-aware Cache objects.
|
public AbstractTransactionSupportingCacheManager()
public void setTransactionAware(boolean transactionAware)
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.
public boolean isTransactionAware()
protected org.springframework.cache.Cache decorateCache(org.springframework.cache.Cache cache)
decorateCache
in class org.springframework.cache.support.AbstractCacheManager