is a microblog
home archives search feed blogroll

Database Data With A TTL

Some database management systems allow you to specify a time-to-live for your data. Mongo, Redis, Cassandra DB and MS Azure DocumentDB support TTL. LevelDB also does through an add-on. As you might have noticed, those are all object databases.

It could be useful for a shopping cart table. The cart could delete itself after a few hours and free up reserved shopping items.

I remember coding scripts that would execute every night to remove dead data. Long gone are those days?


Posted on 2018-03-03   #database     #til  

← Next post    ยท    Previous post →