EHCache

EHCache

Scheme: cache
Name Kind Type Required Deprecated Default Value Enum Values Description
cacheName path java.lang.String true false Name of the cache
maxElementsInMemory parameter int false 1000 The number of elements that may be stored in the defined cache in memory.
memoryStoreEvictionPolicy parameter net.sf.ehcache.store.MemoryStoreEvictionPolicy false LFU LRU
LFU
FIFO
Which eviction strategy to use when maximum number of elements in memory is reached. The strategy defines which elements to be removed.
  • LRU - Lest Recently Used
  • LFU - Lest Frequently Used
  • FIFO - First In First Out
overflowToDisk parameter boolean false true Specifies whether cache may overflow to disk
diskStorePath parameter java.lang.String true This parameter is ignored. CacheManager sets it using setter injection.
eternal parameter boolean false Sets whether elements are eternal. If eternal, timeouts are ignored and the element never expires.
timeToLiveSeconds parameter long false 300 The maximum time between creation time and when an element expires. Is used only if the element is not eternal
timeToIdleSeconds parameter long false 300 The maximum amount of time between accesses before an element expires
diskPersistent parameter boolean false Whether the disk store persists between restarts of the application.
diskExpiryThreadIntervalSeconds parameter long false The number of seconds between runs of the disk expiry thread.
objectCache parameter boolean false Whether to turn on allowing to store non serializable objects in the cache. If this option is enabled then overflow to disk cannot be enabled as well.
eventListenerRegistry parameter org.apache.camel.component.cache.CacheEventListenerRegistry false To configure event listeners using the CacheEventListenerRegistry
cacheLoaderRegistry parameter org.apache.camel.component.cache.CacheLoaderRegistry false To configure cache loader using the CacheLoaderRegistry
cacheManagerFactory parameter org.apache.camel.component.cache.CacheManagerFactory false To use a custom CacheManagerFactory for creating the CacheManager to be used by this endpoint.

By default the CacheManagerFactory configured on the component is used.

key parameter java.lang.String false The default key to use. If a key is provided in the message header, then the key from the header takes precedence.
operation parameter java.lang.String false The default cache operation to use. If an operation in the message header, then the operation from the header takes precedence.
exchangePattern parameter org.apache.camel.ExchangePattern false InOnly InOnly
RobustInOnly
InOut
InOptionalOut
OutOnly
RobustOutOnly
OutIn
OutOptionalIn
Sets the default exchange pattern when creating an exchange
synchronous parameter boolean false false Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported).

cache consumer