Storing CMS / Bloom filters in a serialized form

I’m loving the RedisBloom library, I’m able to do counts with far less memory than I thought were possible. It’s frankly kind of amazing honestly! :slight_smile:

At some point my CMS / Bloom objects will expire due to a needed TTL (to keep our ram from getting too full).

I was wondering if anyone has done anything in the past to store these objects on any kind of long term storage? (S3, hard disk, etc…) How did you read and write the objects to allow for querying the serialized dataset?



Hello Sophie,

I’m not sure that I understood the question, but I’ll give it a try.

You can use the DUMP Redis command to obtain a serialized form of a key, and the RESTORE command to write it back to Redis. That said, Redis itself has no mechanism to offload values to storage in an automatic way, so you’ll have to perform the DUMP before the expiry from your application code.