bin
bin copied to clipboard
Remove expired keys
trafficstars
I see that the expires flag just works by respecting that on reads - but since Mongo doesnt implement any native expiring functionality it means that those key/values will just accumulate forever.
Should this be mentioned in the docs? That is, users might want to implement their own expiry sweeping mechanism? Probably just add an index on +expires+ and then sweep it via cron.
That is true. If flushing expired is necessary some process like this would be needed. I'll leave this open til I doc it a bit in the readme or something.