Hello, I have to deal with a lot of different data and Cassandra seems to be a good fit for my needs so far. However, some of this data is volatile by nature and for those, I would need to set something akin to a TTL. Those TTL could be long, but keeping those data forever would be useless.
I could deal with that by hand, writing some daemon that run regularly and remove what should be removed. However this is not particularly efficient, nor convenient, and I would find it really cool to be able to provide a TTL when inserting something and don't have to care more than that. Which leads me to my question: why Cassandra doesn't allow to set a TTL for data ? Is it for technical reason ? For philosophical reason ? Or just nobody had needed it sufficiently to write it ? >From what I understand of how Cassandra works, it seems to me that it could be done pretty efficiently (even though I agree that it wouldn't be a minor change). That is, it would require to add a ttl to column (and/or row). When reading a column whose timestamp + ttl is expired, it would ignore it (as for tombstoned column). Then during compaction, expired column would be collected. Is there any major difficulties/obstacles I don't see ? Or maybe is there some trick I don't know about that allow to do such a thing already ? And if not, would that be something that would interest the Cassandra community ? Or does nobody ever need such a thing ? (I personally believe it to be a desirable feature, but maybe I am the only one.) Thanks, Sylvain