55.4.2. 消息标头 Camel 2.8+

Camel 2.8 中的标头更改

标头名称和支持的值已更改为带有 'CamelCache' 的前缀,并使用混合的大小写。这样可以更轻松地识别和保持与其他标头分开。CacheConstants 变量名称保持不变,只有它们的值已更改。另外,这些标头现在在执行缓存操作后从交换中删除。

标头描述

CamelCacheOperation

要在缓存上执行的操作。有效选项有

* CamelCacheGet * CamelCacheCheck * CamelCacheAdd * CamelCacheUpdate * CamelCacheDelete * CamelCacheDeleteAll

CamelCacheKey

用于将消息存储在缓存中的缓存密钥。如果 CamelCacheOperation 为 CamelCacheDeleteAll,则缓存键是可选的

CamelCacheAddCamelCacheUpdate 操作支持额外的标头:

标头类型描述

CamelCacheTimeToLive

整数

Camel 2.11: 生存时间(以秒为单位)。

CamelCacheTimeToIdle

整数

Camel 2.11: 空闲时间(以秒为单位)。

CamelCacheEternal

布尔值

Camel 2.11: 内容是否合理。