Snapchat / KeyDB

A Multithreaded Fork of Redis
https://keydb.dev
BSD 3-Clause "New" or "Revised" License
11.02k stars 564 forks source link

[NEW] Specify which keys should go directly to flash #846

Open AdamJSoftware opened 6 days ago

AdamJSoftware commented 6 days ago

The problem/use-case that the feature addresses

I am thinking about using keydb as log store. In this case, I would like my logs to be stored directly to flash in order to avoid filling up memory with unecessary log data that will not be frequently used. At the current moment, there seems to be a policy to set allkeys-lru. However, it would be nice to have a policy where I can do allkeys-lru and my-logkey-*. In this case, any keys starting with my-logkey will be written directly to flash and avoid filling up memory.