EHCache

EHCache

Description: Camel Cache support based on ehCache
Scheme: cache
Syntax: cache:cacheName
Maven: org.apache.camel/camel-cache/2.16.1
Name Kind Group Required Default Type Enum Description
cacheName path common true java.lang.String Name of the cache
cacheLoaderRegistry parameter common org.apache.camel.component.cache.CacheLoaderRegistry To configure cache loader using the CacheLoaderRegistry
cacheManagerFactory parameter common org.apache.camel.component.cache.CacheManagerFactory 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.

diskExpiryThreadIntervalSeconds parameter common long The number of seconds between runs of the disk expiry thread.
diskPersistent parameter common boolean Whether the disk store persists between restarts of the application.
diskStorePath parameter common java.lang.String This parameter is ignored. CacheManager sets it using setter injection.
eternal parameter common boolean Sets whether elements are eternal. If eternal, timeouts are ignored and the element never expires.
eventListenerRegistry parameter common org.apache.camel.component.cache.CacheEventListenerRegistry To configure event listeners using the CacheEventListenerRegistry
key parameter common java.lang.String The default key to use. If a key is provided in the message header, then the key from the header takes precedence.
maxElementsInMemory parameter common 1000 int The number of elements that may be stored in the defined cache in memory.
memoryStoreEvictionPolicy parameter common LFU net.sf.ehcache.store.MemoryStoreEvictionPolicy 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
objectCache parameter common boolean 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.
operation parameter common java.lang.String The default cache operation to use. If an operation in the message header, then the operation from the header takes precedence.
overflowToDisk parameter common true boolean Specifies whether cache may overflow to disk
timeToIdleSeconds parameter common 300 long The maximum amount of time between accesses before an element expires
timeToLiveSeconds parameter common 300 long The maximum time between creation time and when an element expires. Is used only if the element is not eternal
exchangePattern parameter advanced InOnly org.apache.camel.ExchangePattern InOnly
RobustInOnly
InOut
InOptionalOut
OutOnly
RobustOutOnly
OutIn
OutOptionalIn
Sets the default exchange pattern when creating an exchange
synchronous parameter advanced false boolean Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported).

cache consumer