Closed Ortovoxx closed 3 years ago
We had auto-sweeping before, it was removed when v3 was released. The reasoning was that manual fetching should have manual sweeping, to prevent possible issues when users manually fetch stuff only for it to disappear by itself, aka the user should know what they're doing regarding caching and data retention.
It could be added back if people feel the need for it, however i havent received any requests about it.
Another thing:
How long a channel should stay in the cache until it is considered sweepable
This description is not accurate as the sweep functions remove based on "time since last active" and not "time since cached"
Ah okay I was unaware that it was implemented and previously removed. As it only sets the interval if the client options are set I don't see why it should be removed? If neither client options are set then there will be no change to the current behaviour.
Just seems a simple implementation rather than the user having to set their own intervals.
with v4 / djs v13 this is now built-in, so im gonna go ahead and close this
To be more in line with how discord.js handles automatic message sweeping for channel and user sweeps I added automatic setting of the interval if those client options are present.
Client options match vanilla discord.js client options