Periodically check if cache is up to date with remote

I am using @apollo/client with Next.js Server Side Rendering. The data I am fetching is from wp-graphql. There is just one slight issue, the cache is forever. I either have to specify the no-cache policy, or clear the cache every x minutes. Is there any better way to do this?