A custom time to live (TTL) period applies to the partition defined in the object store configuration.
For information how rolling TTL behaves, see Rolling TTL.
To configure a custom TTL period for keys stored in the object store:
-
Create an app that uses Mule runtime engine version 4.2.1 or later.
-
Configure the object store in the app.
-
Select the Store operation in the flow and, in the properties window, click the green plus icon (+) for the Object store field:
-
Configure the TTL entries in the Global Object Store Configuration window:
|
For Object Store v2, the Max entries field is not configurable.
|
-
Entry ttl
For Mule 4.2.1 and later, enter a custom TTL value of 0 through 2592000 seconds (30 days).
If Entry ttl is not empty, the TTL is static.
If you leave this field empty, you enable rolling TTL; if you exceed 2592000 seconds, the TTL defaults to 2592000 seconds.
For Mule versions earlier than 4.2.1, leave this field empty to set the TTL to 2592000 seconds.
-
Entry ttl unit
Specify the TTL time interval, such as MINUTES.
-
Expiration interval
Specify how frequently to run the expiration thread.
Set this parameter to a positive value that is less than the Entry ttl value.
If this field is blank or the value is less than or equal to zero, Object Store v2 ignores Entry ttl.
-
Expiration interval unit
Specify the expiration interval time unit, such as MINUTES.
-
Click OK to dismiss the window.