Handling cache when scaling multiple instances

Hi,

I was wondering how do you guys handle the clearing of the cache for a client when you scale your application to multiple instances?

For example, in my scenario I am using apollo server mongodb datasource library and on the client side I use the regular in-memory cache.

I am able to effectively clear or reset the cache on both GraphQL and the client side.
But I noticed that I will get into issues when scaling to multiple instances because the cache is only cleared for the instance itself and the client communicating with that instance of the GraphQL server.

I was wondering how do you guys handle this usually?

Any help is appreciated, thanks!

Which Apollo client are you referring to here, Web, iOS, or Android/Kotlin?

Sorry about that, on the client side I am using the Web version of the client.