edit-icon download-icon

Time To Live

Last Updated: Apr 23, 2018

Time To Live (TTL) is a data table attribute measured in seconds that indicates the validity period of data. To save data storage space and reduce storage costs, Table Store automatically clears any data that exceeds TTL. TTL usage is described as follows:

  • Set TTL during table creation. If you do not need a data expiration date, set TTL to –1.

  • After table creation, you can use the UpdateTable operation to dynamically change the value of TTL.

For a data table where TTL is 86400 (one day), all attribute columns with versions earlier than 1468944000000 (divided by 1000 and converted to seconds to get 2016-07-20 00:00:00 UTC) expires at 2016-07-21 00:00:00 UTC and will be automatically cleared.

Expired data is cleared asynchronously. When dynamically modifying the value of TTL, the following conditions may apply:

  • Data with a date that exceeds the value of TTL is invalid and cannot be viewed or accessed, even though it is not deleted.

  • If you reduce the value of TTL, data with a date that exceeds the later value is deleted asynchronously.

  • If you increase the value of TTL, data that had exceeded the previous TTL value, and has not been deleted, can be accessed again.

Thank you! We've received your feedback.