March 2024

Time-to-Live (TTL) Feature for Entity Service

1min

Date: Mar 7, 2024

We are excited to announce the release of the Time-to-Live (TTL) feature for the Entity Service. This feature enables automatic management of entity instance lifecycles by allowing developers to specify an expiration time for each entity type. With TTL, developers can remove outdated or irrelevant data from the system.

Key Features:

  • Configurable TTL: Developers can now set a `terminalTTL` value for each entity type, specifying the number of days after which an entity instance will expire.
  • Automatic Expiration: When an entity instance reaches its expiration time, it will be automatically deleted from the system, eliminating the need for manual cleanup.
  • TTL Calculation: Upon entity instance creation, the TTL attribute is set as TTL = current_timestamp + terminalTTL in epoch (seconds), representing the expiry date time.
  • TTL Update: When an entity instance is updated, the TTL is re-calculated as TTL = current_timestamp + terminalTTL, ensuring the expiry time reflects the most recent modification.

Please refer to the updated Entity Type documentation for more details on using the TTL feature.