Any caching issue with this script should just be page caching. As such, you should be able to fix it by purging the page.
This is a custom script imported from the dev wiki. Fandom staff don't maintaining it so reporting it to them won't solve anything.
There is no way to retrieve whether or not a user is online. This script merely guesses based on time since the user's last activity on the local wiki. For instance, if you are logged in but your last edit was a week ago, it will show you as offline. If you just logged off but edited 10 minutes ago, it will show you as online. In short, it can be wildly inaccurate.