O'Reilly logo

Cassandra Design Patterns - Second Edition by Rajanarayanan Thottuvaikkatumana

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

Purge pattern

Whenever there is a need to remove data after a certain period of time without any external intervention, use the TTL property while inserting records to the Cassandra column family. Instead of depending on the applications or any other external event's intervention, data can be purged off the column family by using the TTL property. The USING TTL clause in CQL can be used to achieve the same. This completely removes the burden from the applications to remove records. Once the time is over, the records are automatically removed from the Cassandra column families. This is very suitable for data items that are short lived in the data store such as session data, cached data, and so on. There are ways to report the time remaining for ...

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