Some of the answers to this question deal with older versions of Cassandra. The correct answer for this kind of problem depends on the version of
This answer dates to before the release of Cassandra version 1.2, which provided substantially different functionality for handling lists. The answer might be inappropriate if you are using Cassandra 1.2+.
I would encode lists in the column key, using composite columns with the real column name as the first dimension, ie:
row_key -> {
[column_name; entry1] -> "",
[column_name; entry2] -> "",
...
}
Then, to read the list, you would need to do a get_slice from [column_name; ] to [column_name; ] - note the empty dimensions.
The great thing about this is it actually implements a set quite nicely; the list cannot contains the same thing twice. I think thins works in your usecase. The list would also be maintained in sorted order.