Cache Component
Warning |
---|
This component is deprecated. As of Camel 2.18.0 You should use Ehcache. |
Available as of Camel 2.1
...
Name | Default Value | Description |
---|---|---|
|
| The number of elements that may be stored in the defined cache |
|
| The number of elements that may be stored in the defined cache. Options include
|
|
| Specifies whether cache may overflow to disk |
|
| Sets whether elements are eternal. If eternal, timeouts are ignored and the |
|
| The maximum time between creation time and when an element expires. |
|
| The maximum amount of time between accesses before an element expires |
|
| Whether the disk store persists between restarts of the Virtual Machine. |
|
| The number of seconds between runs of the disk expiry thread. |
|
| Camel 2.8: If you want to use a custom factory which instantiates and creates the EHCache |
|
| Camel 2.8: Sets a list of EHCache |
|
| Camel 2.8: Sets a list of |
|
| Camel 2.10: To configure using a cache key by default. If a key is provided in the message header, then the key from the header takes precedence. |
|
| Camel 2.10: To configure using an cache operation by default. If an operation in the message header, then the operation from the header takes precedence. |
objectCache | false | Camel 2.15: 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. |
Cache Component options
Name | Default Value | Description |
---|---|---|
|
| To use a custom |
|
| To use a custom |
|
| Camel 2.13/2.12.3: To configure the location of the |
...
Message Headers up to Camel 2.7
Div | ||||||
---|---|---|---|---|---|---|
| ||||||
| ||||||
Wiki Markup | ||||||
{div:class=confluenceTableSmall}
|| Header || Description ||
| {{CACHE_OPERATION}} | The operation to be performed on the cache. Valid options are
- GET
- CHECK
- ADD
- UPDATE
- DELETE
- DELETEALL\\
{{GET}} and {{CHECK}} requires *Camel 2.3* onwards. |
| {{CACHE_KEY}} | The cache key used to store the Message in the cache. The cache key is optional if the CACHE_OPERATION is DELETEALL |
{div} |
Message Headers Camel 2.8+
Info | ||
---|---|---|
| ||
The header names and supported values have changed to be prefixed with 'CamelCache' and use mixed case. This makes them easier to identify and keep separate from other headers. The CacheConstants variable names remain unchanged, just their values have been changed. Also, these headers are now removed from the exchange after the cache operation is performed. |
Div | ||||||
---|---|---|---|---|---|---|
| ||||||
| ||||||
Wiki Markup | ||||||
{div:class=confluenceTableSmall}
|| Header || Description ||
| {{CamelCacheOperation}} | The operation to be performed on the cache. The valid options are
- CamelCacheGet
- CamelCacheCheck
- CamelCacheAdd
- CamelCacheUpdate
- CamelCacheDelete
- CamelCacheDeleteAll |
| {{CamelCacheKey}} | The cache key used to store the Message in the cache. The cache key is optional if the CamelCacheOperation is CamelCacheDeleteAll |
{div} |
The CamelCacheAdd
and CamelCacheUpdate
operations support additional headers:
Div | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||
| ||||||||||||||||||||||||
Wiki Markup | ||||||||||||||||||||||||
{div:class=confluenceTableSmall}
|| Header || Type || Description ||
| {{CamelCacheTimeToLive}} | {{Integer}} | *Camel
|
Cache Producer
Sending data to the cache involves the ability to direct payloads in exchanges to be stored in a pre-existing or created-on-demand cache. The mechanics of doing this involve
...