Need Help with WPGraphQL Caching Issue: WPGraphQL Smart Cache Not Invalidating Cache

[ad_1]

Hi everyone,

I'm facing an issue with caching using WPGraphQL and the WPGraphQL Smart Cache plugin on my WordPress site. Here’s a brief overview of the problem I’m encountering:

Issue: I’ve configured WPGraphQL Smart Cache to cache GraphQL queries. However, I’m experiencing the following issues:

  1. No x-cache Header: I’m not seeing the x-cache header in the network responses when making GraphQL requests.
  2. Cache Not Invalidating: Even though the plugin is activated, updates made in WordPress (e.g., editing posts) are not reflected in the GraphQL queries. The data returned by the queries remains stale.

Steps Taken:

  • Verified that WPGraphQL Smart Cache is activated and configured correctly.
  • Attempted to manually clear and reset the cache.
  • Checked network response headers for cache-related information, but no x-cache header is present.
  • Tried using fetchPolicy: "no-cache" in my Apollo Client queries to bypass cache, but it didn’t resolve the issue.

Questions:

  1. Has anyone experienced similar issues with WPGraphQL Smart Cache not working or not showing the x-cache header?
  2. Are there additional configurations or troubleshooting steps I might be missing?
  3. Are there alternative caching solutions for GraphQL queries in WordPress that you would recommend?

consider I use just WordPress in local area with nextjs, in some tutorials I faced wpEngine

I’d appreciate any insights or suggestions from the community. Thank you in advance for your help!

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer