SplayTreeMap supports a maxsize option:
stm = SplayTreeMap(String, String).new
stm.maxsize = 10
I think this just limits the number of keys you can store... Part of me thinks a file size option may be better in some cases 🤔 Like, don't let my cache go over 10mb.... I'm not sure how we could do that reliably, or efficiently, but I wanted to at least jot it down.
SplayTreeMap supports a maxsize option:
I think this just limits the number of keys you can store... Part of me thinks a file size option may be better in some cases 🤔 Like, don't let my cache go over 10mb.... I'm not sure how we could do that reliably, or efficiently, but I wanted to at least jot it down.