On Mon, Dec 5, 2011 at 3:06 PM, <firstname.lastname@example.org>
Thanks for the answer, as I read the book on Cassandra, I was not aware at that time on Composite Key which I recently discovered.
Composite Type's are useful for handling data-versions.
You mentioned a TTL and let the database remove the date for me. I never read about that. Is it possible without an external batch ?
Yes, TTL if set on column, auto delete column for you.
I will try to rephrase in any case my goal:
- I would like to store for a user (identified by its id) several carts (BLOB).
- Associated to these carts, I would like to attach metadata like expiration date and possibly others.
- I would like to be able to retrieve all the carts of a given userId.
I would use timeline with TTL for carts as separate CF. And cart_Id to reverse index in userId CF with TTL set on columns.
- I would like to have a mean to remove expired carts.
set TTL on each column.
id:user1 //hack : to prevent unwanted behavior one column with no ttl.