I'm building a NextJS application for a small company. This application consists of a dashboard used by the 10 employees of this company and functions as an ERP.
We have an API that provides information for all entities, and the React components consume the endpoints of this API. I'm thinking of using RTK Query and its cache functionalities to reduce the number of API calls.
I know that RTK Query has strategies for Refreshing Cached Data (tags, etc). However, the problem is that with 10 users using this web application simultaneously, there's a risk that one client updates a resource (creates a new entity or updates an existing one) and the other 9 users see outdated data.
How to solve this?