evaera / RoVer

This repo is RoVer V1, which is now deprecated and will no longer work. Get Rover V2 now: https://rover.link
https://rover.link
Apache License 2.0
145 stars 201 forks source link

Add cache item TTL #325

Closed Regalijan closed 3 years ago

Regalijan commented 3 years ago

Allow setting a custom TTL for each collection instead of clearing everything every 30 seconds. Cache.set now takes an expiry parameter, which will be checked by the autoclear every 60 seconds. Setting the expiry to 0 will preserve the old behavior of it being cleared on every autoclear.

evaera commented 3 years ago

Does this work? Can you test it? @Wolftallemo

Regalijan commented 3 years ago

From my own testing it appears to work, although some things aren't set in cache even though they probably should be (but that's for another pr)

Rythian2277 commented 3 years ago

I've began testing with this functionality on a bot in multiple servers, I should have reliable results within a day or two.

Rythian2277 commented 3 years ago

No errors have come around from these changes over the past 3 days.

Rythian2277 commented 3 years ago

@evaera There's no issues with this but due to it being an edit to caches, I would prefer it if you did the final review and merging.