Open DaChrissi opened 6 years ago
I think a safe assumption would be to cache the list for something like 1-2 minutes.
How about reloading when a song...
or/and when a command like !reload
or !list
or !refresh
is issued ?
I wouldn't create a new command for that - I would just do it silently in the background. We should definitely update the list when songs are added or deleted. However, care should be taken when we add this at too many places, as there might be race conditions then.
We definitely need a safe guard preventing race conditions for that.
cache it unless refresh is neccessary