Caffeine Cache

Discover more about the Caffeine Cache connector and how to use it on the Digibee Integration Platform.

Important information:

  • This documentation is currently available only in English but will soon be translated into Portuguese.

  • The content is under revision and may change. We appreciate your understanding as we work to improve the documentation.

Perform caching operations using Caffeine Cache.

Parameters

Take a look at the configuration options for the component. Parameters supported by Double Braces expressions are marked with (DB).

Required Tab

ParameterDescriptionDefault valueData type

Cache Name (DB)

Cache name

N/A

string

Fail On Error

If true will stop pipeline with an error, if false will let the pipeline continue but the output will show a property success with value false

false

boolean

Optional Tab

ParameterDescriptionDefault valueData type

Action

To configure the default cache action. If an action is set in the message header, then the operation from the header takes precedence.

string

Create Cache If Not Exist

Automatic create the Caffeine cache if none has been configured or exists in the registry.

true

boolean

Eviction Type

Set the eviction Type for this cache

SIZE_BASED

string

Expire After Access Time

Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry’s creation, the most recent replacement of its value, or its last read. Access time is reset by all cache read and write operations. The unit is in seconds.

300

number

Expire After Write Time

Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry’s creation, or the most recent replacement of its value. The unit is in seconds.

300

number

Initial Capacity

Sets the minimum total size for the internal data structures. Providing a large enough estimate at construction time avoids the need for expensive resizing operations later, but setting this value unnecessarily high wastes memory.

N/A

number

Key (DB)

To configure the default action key. If a key is set in the message header, then the key from the header takes precedence.

N/A

string

Maximum Size

Specifies the maximum number of entries the cache may contain. Note that the cache may evict an entry before this limit is exceeded or temporarily exceed the threshold while evicting. As the cache size grows close to the maximum, the cache evicts entries that are less likely to be used again. For example, the cache may evict an entry because it hasn’t been used recently or very often. When size is zero, elements will be evicted immediately after being loaded into the cache. This can be useful in testing, or to disable caching temporarily without a code change. As eviction is scheduled on the configured executor, tests may instead prefer to configure the cache to execute tasks directly on the same thread.

N/A

number

Stats Enabled

To enable stats on the cache

false

boolean

Value Type (DB)

The cache value type, default java.lang.Object

N/A

string

Headers Tab

ParameterDescriptionDefault valueData type

CamelCaffeineAction (DB)

The action to execute. Possible values: CLEANUP PUT PUT_ALL GET GET_ALL INVALIDATE INVALIDATE_ALL AS_MAP

N/A

string

CamelCaffeineActionHasResult

The flag indicating whether the action has a result or not.

false

boolean

CamelCaffeineActionSucceeded

The flag indicating whether the action was successful or not.

false

boolean

CamelCaffeineKey (DB)

The key for all actions on a single entry.

N/A

string

CamelCaffeineKeys (DB)

The keys to get (GET_ALL), to invalidate (INVALIDATE_ALL) or existing (AS_MAP) according to the action.

N/A

JSON

CamelCaffeineValue (DB)

The value of key for all put actions (PUT or PUT_ALL).

N/A

string

CamelCaffeineOldValue (DB)

The old value returned according to the action.

N/A

string

Successful executions should output at least a property "success": true

Last updated