dragonfly
dragonfly copied to clipboard
chore: Limit expiry value to 32 bits.
We use adaptive precision, where we keep "millis" precision if we can, and switch to seconds precision if the deadline is too large.
This actually was before but now I reduced the cut-off to 4B ms, or 49 days. Also, the ttl in seconds is now limited to 4B sec, with larger values quietly rounded down to this limit.
the next step would be to start using expire_base_ and generations to represent the absolute times using ~49 days ExpirePeriod. The absolute time := expire_base_ + expire_period so we should refresh expire_base_ daily to maintain 48-49 days span.
Not sure if I have to start using the phrase "not sure" less 🤔