How do you handle background api requests in your vue/x apps?

Lets say you have 3-pages spa homepage. Each page should occasionally (via setInterval) request some data from the server no matter what page is open right now. But! There must be feature to stop each background requests loop when the server responds with a specific data.

So far I’ve got some ugly monster gathering in my head consisting of state for setInterval id storage, actions for requests and `mutations that clears interval.