I want to use datastores for a task related to storing information/data for a temporary amount of time. The reason I don’t want to use memory stores for this is that I plan to move around large amounts of data, meaning the 32KB the memory stores provide aren’t enough even when the data is split into multiple keys(for reference datastores give 4MB of space, meaning that to compensate with memory stores I need to make 128 calls to the API).
So the question is, is it possible to clone the memory store behavior of data self-destruction after a specific amount of time is passed into datastores? I thought of running some sort of routine that scans and clears old entries once in a while, how would I make such process effective? Is there a way to mass delete datastore keys?
Thanks in advance if you figure out a way that is fast and doesn’t evolve a lot of API calls.