OrderedStorage storage implementation using Cassandra as backend. Note: since we are interested in keeping duplicates or ordered data, we upsert the data ignoring what the timestamp actually means.
| 860 | |
| 861 | |
| 862 | class CassandraSetStorage(UnorderedStorage, CassandraListStorage): |
| 863 | """ |
| 864 | OrderedStorage storage implementation using Cassandra as backend. |
| 865 | |
| 866 | Note: since we are interested in keeping duplicates or ordered data, we upsert the data |
| 867 | ignoring what the timestamp actually means. |
| 868 | """ |
| 869 | |
| 870 | def get(self, key): |
| 871 | """Implement interface and override super-class.""" |
| 872 | return set(super(CassandraSetStorage, self).get(key)) |
| 873 | |
| 874 | def insert(self, key, *vals, **kwargs): |
| 875 | """Implement interface and override super-class.""" |
| 876 | buffer = kwargs.pop('buffer', False) |
| 877 | self._client.upsert(key, vals, buffer) |
| 878 | |
| 879 | |
| 880 | if redis is not None: |