O'Reilly logo

Apache Cassandra Essentials by Nitin Padalia

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

TTL

Sometimes we may want to expire or delete some data after a certain amount of time has elapsed. For example, in a column family of a user's status updates, we don't want to keep status updates of users for more than 100 days. One way of doing this is to create a monitoring job to keep track of such things and then delete such data. However, in Cassandra, these things can be taken care of by the database itself. This means a default TTL(time to live) operation could be specified for all the data of a column family as well as per INSERT or DELETE operation. TTL defines a time duration after which Cassandra will start removal process of the data. TTL precision is in seconds. Behind the hood, when a piece of data is removed, a tombstone is put ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required