{"id":31534,"date":"2024-04-05T10:39:15","date_gmt":"2024-04-05T15:39:15","guid":{"rendered":"https:\/\/wpengine.com\/builders\/?p=31534"},"modified":"2024-04-16T15:21:41","modified_gmt":"2024-04-16T20:21:41","slug":"wpgraphql-smart-cache-updates-clarifying-the-cache","status":"publish","type":"post","link":"https:\/\/wpengine.com\/builders\/wpgraphql-smart-cache-updates-clarifying-the-cache\/","title":{"rendered":"WPGraphQL Smart Cache Updates: Clarifying The Cache"},"content":{"rendered":"\n<p>WPGraphQL Smart Cache is a plugin in the WPGraphQL ecosystem that provides on-demand invalidation of cached WPGraphQL data. This means that you can leverage caching solutions like a persistent object cache or a network cache such as Varnish for great performance and automatically invalidate the cached data whenever data changes in WordPress to ensure that cached data stays fresh.<\/p>\n\n\n\n<p>In this article, I will go over in detail the new updates to the plugin.<\/p>\n\n\n\n<p>If you prefer video format, please reference <a href=\"https:\/\/www.youtube.com\/watch?v=G6HOa0STMvI\">the video here<\/a>.<\/p>\n\n\n\n<iframe class=\"youtube-video\" src=\"https:\/\/www.youtube.com\/embed\/G6HOa0STMvI?si=Bvk19O2WUMGf7rPy\" title=\"YouTube video player\" frameborder=\"0\" style=\"display: block; margin: auto; width: 80%; height: 450px;\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\n\n\n\n\n<div class=\"wp-block-group has-polar-background-color has-background is-layout-flow wp-container-core-group-is-layout-7a03825d wp-block-group-is-layout-flow\" style=\"padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--40)\">\n<p class=\"has-large-font-size\"><strong>Table of Contents<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\" id=\"Prerequisites\">\n<li><a href=\"#prerequisites\">Prerequisites <\/a><\/li>\n\n\n\n<li><a href=\"#wpgraphql-smart-cache\">WPGraphQL Smart Cache<\/a><\/li>\n\n\n\n<li><a href=\"#whats-new\">What&#8217;s New<\/a><\/li>\n\n\n\n<li><a href=\"#network-cache\">Network Cache<\/a><\/li>\n\n\n\n<li><a href=\"#object-cache\">Object Cache<\/a><\/li>\n\n\n\n<li><a href=\"#debugging\">Debugging<\/a><\/li>\n\n\n\n<li><a href=\"#log-purge-events\">Log Purge Events<\/a><\/li>\n\n\n\n<li><a href=\"#purge-now\">Purge Now<\/a><\/li>\n\n\n\n<li><a href=\"#did-you-purge-the-cache\">Did You Purge The Cache?<\/a><\/li>\n\n\n\n<li><a href=\"#conclusion\">Conclusion<\/a><\/li>\n<\/ul>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Prerequisites\">Prerequisites<\/h2>\n\n\n\n<p>To benefit from this article, you must have a fundamental understanding of headless WordPress, WPGraphQL, and Smart Cache.&nbsp;&nbsp;<\/p>\n\n\n\n<p>If you are not familiar with the basics and functionality of WPGraphQL Smart Cache, please refer to my <a href=\"https:\/\/wpengine.com\/builders\/wpgraphql-smart-cache-with-next-js-and-apollo\/\">article<\/a> as well as the <a href=\"https:\/\/www.wpgraphql.com\/2022\/12\/20\/introducing-wpgraphql-smart-cache\">WPGraphQL article here<\/a>.<\/p>\n\n\n\n<div class=\"wp-block-group has-base-color has-text-color has-background has-link-color wp-elements-688844c5591b0d750f2228c71fe3f5ec has-global-padding is-layout-constrained wp-container-core-group-is-layout-c825ac28 wp-block-group-is-layout-constrained\" style=\"border-radius:12px;background-color:#180038;margin-bottom:var(--wp--preset--spacing--30);padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\">\n<div class=\"wp-block-group alignwide is-content-justification-left is-layout-flex wp-container-core-group-is-layout-682063c7 wp-block-group-is-layout-flex\" style=\"padding-top:0;padding-right:0;padding-bottom:0;padding-left:0\">\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-e4830150 wp-block-group-is-layout-flex\">\n<div class=\"wp-block-outermost-icon-block\"><div class=\"icon-container\" style=\"width:38px\"><svg fill=\"none\" viewBox=\"0 0 38 30\" aria-label=\"Frost logo\"><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M18.149.498c-.043.01-.16.025-.259.033-.406.03-.933.112-1.53.238-.205.043-.769.198-.98.269-.114.039-.574.207-.618.226l-.292.124c-.3.128-.74.346-1.01.502a4.92 4.92 0 0 1-.206.115 10.57 10.57 0 0 0-4.878 6.728c-.018.106-.035.118-.237.165-.17.039-.23.055-.54.147C3.36 10.302.453 13.9.037 18.401c-.045.49-.05 8.792-.006 9.065.18 1.094.97 1.87 2.052 2.012.375.049 4.136.05 4.527.002 1.185-.148 2.032-1.046 2.102-2.228.055-.925.614-1.62 1.403-1.745.29-.046.37-.05.528-.022.905.158 1.437.76 1.5 1.7.083 1.249.888 2.135 2.084 2.294.363.048 4.162.048 4.518 0 .633-.086 1.262-.421 1.616-.862l.124-.154c.13-.156.29-.575.341-.885.046-.277.047-8.617.002-8.907-.183-1.17-1.208-1.979-2.505-1.979-.386 0-1.057-.13-1.593-.306a5.82 5.82 0 0 1-3.868-4.496c-.16-.907-.112-1.586.187-2.655.417-1.494 1.717-2.941 3.22-3.585l.158-.068c.28-.121.809-.268 1.214-.336a5.03 5.03 0 0 1 1.98.042c2.288.53 3.911 2.078 4.476 4.272.198.768.189.427.19 7.436.002 3.432.012 6.28.023 6.399.304 3.24 2.565 5.63 5.713 6.037.829.107 1.116.107 1.8-.001 2.037-.322 3.807-1.829 4.698-4.001l.046-.112c.148-.36.347-1.107.407-1.53.119-.823.073-1.372-.15-1.817-.255-.508-.802-.924-1.493-1.137-.253-.078-.998-.08-1.2-.005-.026.01-.11.037-.183.06-.666.202-1.24.854-1.493 1.696-.03.101-.093.523-.093.63 0 .044-.02.162-.046.26-.44 1.724-2.917 1.715-3.316-.013-.03-.128-.034-.905-.034-6.275 0-6.296-.005-6.684-.089-7.276a11.333 11.333 0 0 0-.114-.742c-.012-.05-.042-.186-.066-.304-.734-3.596-3.431-6.625-6.951-7.805a9.125 9.125 0 0 0-.855-.246 7.503 7.503 0 0 0-.888-.179 18.617 18.617 0 0 0-.877-.117c-.28-.033-.874-.046-.977-.02Zm-.047 8.132c-1.224.212-1.998 1.382-1.8 2.72.027.186.034.213.115.462.554 1.717 3.03 1.998 3.992.452.055-.088.1-.165.1-.172 0-.006.025-.064.056-.128.131-.27.214-.68.214-1.052 0-1.52-1.194-2.539-2.677-2.282Zm-9.55 5.116c.577 2.153 2.094 4.3 3.988 5.648.78.554 1.328.849 2.38 1.28.077.031.556.195.675.23l.247.07.236.069.101.03.006 1.66c.006 1.695.002 1.779-.078 1.615-.772-1.58-2.366-2.836-4.134-3.256-.626-.149-.883-.178-1.552-.178-2.132.001-4.114 1.027-5.234 2.711-.17.254-.36.57-.412.686-.101.22-.1.256-.1-2.611 0-3 .005-3.148.129-3.748a5.873 5.873 0 0 1 1.94-3.294 5.92 5.92 0 0 1 1.518-.927c.222-.091.262-.09.29.015Z\" clip-rule=\"evenodd\"><\/path><\/svg><\/div><\/div>\n\n\n\n<p class=\"has-large-font-size\" style=\"font-style:normal;font-weight:800;letter-spacing:-1px\">WPGraphQL<\/p>\n<\/div>\n\n\n\n<p class=\"has-small-font-size wp-container-content-c86e52ed\" style=\"line-height:1.5\">An extendable GraphQL <br>schema &amp; API for WordPress.<\/p>\n\n\n\n<div class=\"wp-block-buttons is-horizontal is-content-justification-center is-nowrap is-layout-flex wp-container-core-buttons-is-layout-3bdbf2e2 wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button is-style-outline-base\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/wpeng.in\/wpgraphql-builders\/\" style=\"border-radius:99px;padding-top:10px;padding-right:24px;padding-bottom:10px;padding-left:24px\" target=\"_blank\" rel=\"noreferrer noopener\">Download<\/a><\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<p>You will also need a supported host since this requires a specific implementation within your hosting platform to work. WP Engine is one host that supports this out of the box. If you do not have a WP Engine server, you can get a free sandbox here.&nbsp;&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-group has-base-color has-heliotrope-background-color has-text-color has-background has-link-color wp-elements-60580c77f35127ab4c58efd3ae854863 has-global-padding is-layout-constrained wp-container-core-group-is-layout-9b866ece wp-block-group-is-layout-constrained\" style=\"border-radius:12px;margin-bottom:var(--wp--preset--spacing--30);padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\">\n<div class=\"wp-block-group alignwide is-content-justification-left is-layout-flex wp-container-core-group-is-layout-4bb02320 wp-block-group-is-layout-flex\" style=\"padding-top:0;padding-right:0;padding-bottom:0;padding-left:0\">\n<p style=\"font-size:26px;font-style:normal;font-weight:700;letter-spacing:-1px;line-height:1\">Headless<br>Platform<\/p>\n\n\n\n<p class=\"has-small-font-size wp-container-content-9cfa9a5a\" style=\"line-height:1.5\">The all-in-one platform for <br>radically fast headless sites.<\/p>\n\n\n\n<div class=\"wp-block-buttons is-content-justification-right is-nowrap is-layout-flex wp-container-core-buttons-is-layout-b315634e wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button is-style-outline-base\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/wpeng.in\/headless-platform\/\" style=\"border-radius:99px;padding-top:10px;padding-right:24px;padding-bottom:10px;padding-left:24px\" target=\"_blank\" rel=\"noreferrer noopener\">Try for free \u2192<\/a><\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<p>Jason Bahl also has a gist to make it work with Lightspeed hosts: <a href=\"https:\/\/gist.github.com\/jasonbahl\/d777c7229bad5142211a58ed00da6598\">https:\/\/gist.github.com\/jasonbahl\/d777c7229bad5142211a58ed00da6598<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"wpgraphql-smart-cache\">WPGraphQL Smart Cache<\/h2>\n\n\n\n<p>Two of the most difficult things in Web Development are naming things and cache invalidation.&nbsp; Luckily, the creation of WPGraphQL Smart Cache has made it easier.&nbsp; Since this plugin\u2019s beginnings two years ago, it has some updates to go over. Let&#8217;s dive into them.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"whats-new\">What\u2019s New<\/h3>\n\n\n\n<p>The UI within WP Admin when downloading the plugin clarifies the settings more to improve the visual hierarchy and organization.<\/p>\n\n\n\n<p><br>When you <a href=\"https:\/\/wordpress.org\/plugins\/wpgraphql-smart-cache\/\">download the plugin<\/a>, navigate over to the GraphQL &gt; Settings &gt; Cache page on the left-hand side of the hamburger menu and you should see this:<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/vPWSgRLuZKnvqxY2sj9M4oZlLr9XXVQVJvWFCui-vesFRuw04eQjmbQdFQGCKIYcc93rH0Zlwva3ivsl_QcC1fgU5iJ9o-PfQ5ZlTH7d7-1lOrAHHwXPKLpGHmDzj16_MVVhRhFrkkRS7ucFccNtITM\" width=\"681\" height=\"378\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"network-cache\">Network Cache<\/h3>\n\n\n\n<p>The first setting is the Network Cache.&nbsp; Network cache refers to a system that stores copies of content close to users, typically within a network infrastructure like CDNs or web servers, to reduce latency and server load. When a user requests content, the network cache provides the data from the nearest cache node instead of fetching it from the origin server. This process speeds up content delivery, decreases the load on the origin server, and improves the overall user experience by providing quicker access to the content.<\/p>\n\n\n\n<p>This setting influences how the plugin interacts with network cache clients like Varnish. For instance, the <code>Cache-Control max-age<\/code> setting specifies how long (in seconds) the network should consider the cached data fresh for GraphQL requests. By setting a proper max-age, the plugin leverages the built-in caching layers of the hosting environment, reducing the load on the WordPress server.<\/p>\n\n\n\n<p>If you use a <code>max-age<\/code> of <code>0<\/code> , requests will not be cached. This could be necessary for scenarios where data must be real-time or near-real-time, and any caching could result in stale data being served to the client.<\/p>\n\n\n\n<p>However, this should be used with caution for these reasons:<\/p>\n\n\n\n<p><strong>Performance Impact<\/strong>: Without caching, each request for data will hit the WordPress server directly, which can lead to increased load times for the client and higher resource utilization on the server. This defeats the primary benefit of caching, which is to improve performance by reducing the load on the server.<\/p>\n\n\n\n<p><strong>Scalability Concerns<\/strong>: In high-traffic scenarios, bypassing the cache could potentially overload the server with requests that could have been served from the cache, leading to scalability issues.<\/p>\n\n\n\n<p><strong>Increased Costs<\/strong>: More server resources to handle uncached requests can lead to increased operational costs, especially if you are using a hosting service that charges based on resource usage.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"object-cache\">Object Cache<\/h3>\n\n\n\n<p>Object cache is a mechanism that stores the results of complex data queries in memory to be quickly retrieved on subsequent requests, without the need to re-query the database each time. This is particularly useful for dynamically generated content that does not change between user requests, as it can significantly reduce database load and improve website performance.<\/p>\n\n\n\n<p>Object cache should ideally be considered as a secondary layer of caching when network cache cannot be used. Network cache serves a broader scope by caching entire HTTP responses, often at the edge closer to the user, and is more efficient for content that is shared across many users. Object cache, being closer to the application layer, is suited for pieces of data unique to the application logic that might not be as effectively cached by network layers.<\/p>\n\n\n\n<p>In scenarios where the network cache like Varnish is not available or suitable\u2014perhaps due to highly dynamic content that changes frequently or personalized content that is unique per user\u2014object caching becomes beneficial. It offers granular control over how individual pieces of data are stored and retrieved. However, because it typically resides on the same server as the application, it does not provide the same scalability benefits as network caching and can increase the load on the server if not managed correctly. Hence, it&#8217;s recommended to leverage network caching first, where possible, to maximize the efficiency and scalability of content delivery.<\/p>\n\n\n\n<p>The new settings here would allow users to enable object caching and define the time-to-live (TTL) for the cached objects, which means how long the data remains in the cache before it&#8217;s considered stale and refreshed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"debugging\">Debugging<\/h2>\n\n\n\n<p>Developers are always stoked to have tools for easier debugging.&nbsp; Now they are available in Smart Cache.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"log-purge-events\">Log Purge Events<\/h3>\n\n\n\n<p>This specific setting within the debugging section gives users the option to track when and why cache purges happen. This could be critical for understanding patterns in cache invalidation and ensuring the cache behaves as expected.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"purge-now\">Purge Now<\/h3>\n\n\n\n<p>This option provides a manual trigger for users to clear the cached GraphQL Queries. This feature is useful when changes have been made that should be reflected immediately, bypassing the default expiration time.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"did-you-purge-the-cache\">Did You Purge The Cache<\/h3>\n\n\n\n<p>This field confirms whether a cache purge has been successfully triggered and completed. Knowing the last purge timestamp can be helpful in coordinating cache invalidation with site updates or troubleshooting issues.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>The WPGraphQL Smart Cache plugin is a tool that supports and solves cache invalidation and caching optimally for WPGraphQL queries.&nbsp;<\/p>\n\n\n\n<p>I touched on some updated features of the plugin. I encourage everyone to dive into the repo, as mentioned, to get their hands dirty and explore all the other awesome features in this plugin.<\/p>\n\n\n\n<p>There are more changes and updates to come. So as always stay tuned! We also would love to hear your feedback, thoughts, and projects you are doing in Headless WordPress so hit us up in our <a href=\"https:\/\/discord.com\/invite\/headless-wordpress-836253505944813629\">Discord<\/a>!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WPGraphQL Smart Cache is a plugin in the WPGraphQL ecosystem that provides on-demand invalidation of cached WPGraphQL data. This means that you can leverage caching solutions like a persistent object [&hellip;]<\/p>\n","protected":false},"author":20,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_EventAllDay":false,"_EventTimezone":"","_EventStartDate":"","_EventEndDate":"","_EventStartDateUTC":"","_EventEndDateUTC":"","_EventShowMap":false,"_EventShowMapLink":false,"_EventURL":"","_EventCost":"","_EventCostDescription":"","_EventCurrencySymbol":"","_EventCurrencyCode":"","_EventCurrencyPosition":"","_EventDateTimeSeparator":"","_EventTimeRangeSeparator":"","_EventOrganizerID":[],"_EventVenueID":[],"_OrganizerEmail":"","_OrganizerPhone":"","_OrganizerWebsite":"","_VenueAddress":"","_VenueCity":"","_VenueCountry":"","_VenueProvince":"","_VenueState":"","_VenueZip":"","_VenuePhone":"","_VenueURL":"","_VenueStateProvince":"","_VenueLat":"","_VenueLng":"","_VenueShowMap":false,"_VenueShowMapLink":false,"footnotes":""},"categories":[23],"tags":[],"class_list":["post-31534","post","type-post","status-publish","format-standard","hentry","category-headless"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>WPGraphQL Smart Cache Updates: Clarifying The Cache - Builders<\/title>\n<meta name=\"description\" content=\"WPGraphQL Smart Cache is a plugin in the WPGraphQL ecosystem that provides on-demand invalidation of cached WPGraphQL data. This means that you can leverage caching solutions like a persistent object cache or a network cache such as Varnish for great performance and automatically invalidate the cached data whenever data changes in WordPress to ensure that cached data stays fresh.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wpengine.com\/builders\/wpgraphql-smart-cache-updates-clarifying-the-cache\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WPGraphQL Smart Cache Updates Clarifying The Cache\" \/>\n<meta property=\"og:description\" content=\"WPGraphQL Smart Cache not only gives you API data quickly and accurately but now has clear cache explanations so you can fully understand the cache settings and debugging.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpengine.com\/builders\/wpgraphql-smart-cache-updates-clarifying-the-cache\/\" \/>\n<meta property=\"og:site_name\" content=\"Builders\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-05T15:39:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-16T20:21:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wpengine.com\/builders\/wp-content\/uploads\/2024\/04\/WPE-Builders-Social-1-2-1024x576.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"576\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Francis Agulto\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@wpebuilders\" \/>\n<meta name=\"twitter:site\" content=\"@wpebuilders\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Francis Agulto\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/wpgraphql-smart-cache-updates-clarifying-the-cache\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/wpgraphql-smart-cache-updates-clarifying-the-cache\\\/\"},\"author\":{\"name\":\"Francis Agulto\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#\\\/schema\\\/person\\\/bcdcb4ac0b215c34b6b30e440a24dc54\"},\"headline\":\"WPGraphQL Smart Cache Updates: Clarifying The Cache\",\"datePublished\":\"2024-04-05T15:39:15+00:00\",\"dateModified\":\"2024-04-16T20:21:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/wpgraphql-smart-cache-updates-clarifying-the-cache\\\/\"},\"wordCount\":1136,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/wpgraphql-smart-cache-updates-clarifying-the-cache\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/lh7-us.googleusercontent.com\\\/vPWSgRLuZKnvqxY2sj9M4oZlLr9XXVQVJvWFCui-vesFRuw04eQjmbQdFQGCKIYcc93rH0Zlwva3ivsl_QcC1fgU5iJ9o-PfQ5ZlTH7d7-1lOrAHHwXPKLpGHmDzj16_MVVhRhFrkkRS7ucFccNtITM\",\"articleSection\":[\"Headless\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/wpengine.com\\\/builders\\\/wpgraphql-smart-cache-updates-clarifying-the-cache\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/wpgraphql-smart-cache-updates-clarifying-the-cache\\\/\",\"url\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/wpgraphql-smart-cache-updates-clarifying-the-cache\\\/\",\"name\":\"WPGraphQL Smart Cache Updates: Clarifying The Cache - Builders\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/wpgraphql-smart-cache-updates-clarifying-the-cache\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/wpgraphql-smart-cache-updates-clarifying-the-cache\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/lh7-us.googleusercontent.com\\\/vPWSgRLuZKnvqxY2sj9M4oZlLr9XXVQVJvWFCui-vesFRuw04eQjmbQdFQGCKIYcc93rH0Zlwva3ivsl_QcC1fgU5iJ9o-PfQ5ZlTH7d7-1lOrAHHwXPKLpGHmDzj16_MVVhRhFrkkRS7ucFccNtITM\",\"datePublished\":\"2024-04-05T15:39:15+00:00\",\"dateModified\":\"2024-04-16T20:21:41+00:00\",\"description\":\"WPGraphQL Smart Cache is a plugin in the WPGraphQL ecosystem that provides on-demand invalidation of cached WPGraphQL data. This means that you can leverage caching solutions like a persistent object cache or a network cache such as Varnish for great performance and automatically invalidate the cached data whenever data changes in WordPress to ensure that cached data stays fresh.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/wpgraphql-smart-cache-updates-clarifying-the-cache\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wpengine.com\\\/builders\\\/wpgraphql-smart-cache-updates-clarifying-the-cache\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/wpgraphql-smart-cache-updates-clarifying-the-cache\\\/#primaryimage\",\"url\":\"https:\\\/\\\/lh7-us.googleusercontent.com\\\/vPWSgRLuZKnvqxY2sj9M4oZlLr9XXVQVJvWFCui-vesFRuw04eQjmbQdFQGCKIYcc93rH0Zlwva3ivsl_QcC1fgU5iJ9o-PfQ5ZlTH7d7-1lOrAHHwXPKLpGHmDzj16_MVVhRhFrkkRS7ucFccNtITM\",\"contentUrl\":\"https:\\\/\\\/lh7-us.googleusercontent.com\\\/vPWSgRLuZKnvqxY2sj9M4oZlLr9XXVQVJvWFCui-vesFRuw04eQjmbQdFQGCKIYcc93rH0Zlwva3ivsl_QcC1fgU5iJ9o-PfQ5ZlTH7d7-1lOrAHHwXPKLpGHmDzj16_MVVhRhFrkkRS7ucFccNtITM\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/wpgraphql-smart-cache-updates-clarifying-the-cache\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WPGraphQL Smart Cache Updates: Clarifying The Cache\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#website\",\"url\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/\",\"name\":\"Builders\",\"description\":\"Reimagining the way we build with WordPress.\",\"publisher\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#organization\",\"name\":\"WP Engine\",\"url\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/wp-content\\\/uploads\\\/2024\\\/05\\\/WP-Engine-Horizontal@2x.png\",\"contentUrl\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/wp-content\\\/uploads\\\/2024\\\/05\\\/WP-Engine-Horizontal@2x.png\",\"width\":348,\"height\":68,\"caption\":\"WP Engine\"},\"image\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/wpebuilders\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCh1WuL54XFb9ZI6m6goFv1g\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/#\\\/schema\\\/person\\\/bcdcb4ac0b215c34b6b30e440a24dc54\",\"name\":\"Francis Agulto\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0c8a05c76944fc987d57296c96dc368055844527088c0aa44297edbfa8b82546?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0c8a05c76944fc987d57296c96dc368055844527088c0aa44297edbfa8b82546?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0c8a05c76944fc987d57296c96dc368055844527088c0aa44297edbfa8b82546?s=96&d=mm&r=g\",\"caption\":\"Francis Agulto\"},\"description\":\"Fran Agulto is a Developer Advocate at WP Engine. He is a lover of all things headless WordPress, Rock Climbing, and overall being stoked for people that love what they do and share that stoke with others! Follow me on Twitter for cool stoked headless WP!\",\"url\":\"https:\\\/\\\/wpengine.com\\\/builders\\\/author\\\/francis-agultowpengine-com-2-2-2-2-2-2-2-2-2-2-2-2\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WPGraphQL Smart Cache Updates: Clarifying The Cache - Builders","description":"WPGraphQL Smart Cache is a plugin in the WPGraphQL ecosystem that provides on-demand invalidation of cached WPGraphQL data. This means that you can leverage caching solutions like a persistent object cache or a network cache such as Varnish for great performance and automatically invalidate the cached data whenever data changes in WordPress to ensure that cached data stays fresh.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wpengine.com\/builders\/wpgraphql-smart-cache-updates-clarifying-the-cache\/","og_locale":"en_US","og_type":"article","og_title":"WPGraphQL Smart Cache Updates Clarifying The Cache","og_description":"WPGraphQL Smart Cache not only gives you API data quickly and accurately but now has clear cache explanations so you can fully understand the cache settings and debugging.","og_url":"https:\/\/wpengine.com\/builders\/wpgraphql-smart-cache-updates-clarifying-the-cache\/","og_site_name":"Builders","article_published_time":"2024-04-05T15:39:15+00:00","article_modified_time":"2024-04-16T20:21:41+00:00","og_image":[{"width":1024,"height":576,"url":"https:\/\/wpengine.com\/builders\/wp-content\/uploads\/2024\/04\/WPE-Builders-Social-1-2-1024x576.png","type":"image\/png"}],"author":"Francis Agulto","twitter_card":"summary_large_image","twitter_creator":"@wpebuilders","twitter_site":"@wpebuilders","twitter_misc":{"Written by":"Francis Agulto"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wpengine.com\/builders\/wpgraphql-smart-cache-updates-clarifying-the-cache\/#article","isPartOf":{"@id":"https:\/\/wpengine.com\/builders\/wpgraphql-smart-cache-updates-clarifying-the-cache\/"},"author":{"name":"Francis Agulto","@id":"https:\/\/wpengine.com\/builders\/#\/schema\/person\/bcdcb4ac0b215c34b6b30e440a24dc54"},"headline":"WPGraphQL Smart Cache Updates: Clarifying The Cache","datePublished":"2024-04-05T15:39:15+00:00","dateModified":"2024-04-16T20:21:41+00:00","mainEntityOfPage":{"@id":"https:\/\/wpengine.com\/builders\/wpgraphql-smart-cache-updates-clarifying-the-cache\/"},"wordCount":1136,"commentCount":0,"publisher":{"@id":"https:\/\/wpengine.com\/builders\/#organization"},"image":{"@id":"https:\/\/wpengine.com\/builders\/wpgraphql-smart-cache-updates-clarifying-the-cache\/#primaryimage"},"thumbnailUrl":"https:\/\/lh7-us.googleusercontent.com\/vPWSgRLuZKnvqxY2sj9M4oZlLr9XXVQVJvWFCui-vesFRuw04eQjmbQdFQGCKIYcc93rH0Zlwva3ivsl_QcC1fgU5iJ9o-PfQ5ZlTH7d7-1lOrAHHwXPKLpGHmDzj16_MVVhRhFrkkRS7ucFccNtITM","articleSection":["Headless"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wpengine.com\/builders\/wpgraphql-smart-cache-updates-clarifying-the-cache\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wpengine.com\/builders\/wpgraphql-smart-cache-updates-clarifying-the-cache\/","url":"https:\/\/wpengine.com\/builders\/wpgraphql-smart-cache-updates-clarifying-the-cache\/","name":"WPGraphQL Smart Cache Updates: Clarifying The Cache - Builders","isPartOf":{"@id":"https:\/\/wpengine.com\/builders\/#website"},"primaryImageOfPage":{"@id":"https:\/\/wpengine.com\/builders\/wpgraphql-smart-cache-updates-clarifying-the-cache\/#primaryimage"},"image":{"@id":"https:\/\/wpengine.com\/builders\/wpgraphql-smart-cache-updates-clarifying-the-cache\/#primaryimage"},"thumbnailUrl":"https:\/\/lh7-us.googleusercontent.com\/vPWSgRLuZKnvqxY2sj9M4oZlLr9XXVQVJvWFCui-vesFRuw04eQjmbQdFQGCKIYcc93rH0Zlwva3ivsl_QcC1fgU5iJ9o-PfQ5ZlTH7d7-1lOrAHHwXPKLpGHmDzj16_MVVhRhFrkkRS7ucFccNtITM","datePublished":"2024-04-05T15:39:15+00:00","dateModified":"2024-04-16T20:21:41+00:00","description":"WPGraphQL Smart Cache is a plugin in the WPGraphQL ecosystem that provides on-demand invalidation of cached WPGraphQL data. This means that you can leverage caching solutions like a persistent object cache or a network cache such as Varnish for great performance and automatically invalidate the cached data whenever data changes in WordPress to ensure that cached data stays fresh.","breadcrumb":{"@id":"https:\/\/wpengine.com\/builders\/wpgraphql-smart-cache-updates-clarifying-the-cache\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpengine.com\/builders\/wpgraphql-smart-cache-updates-clarifying-the-cache\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/builders\/wpgraphql-smart-cache-updates-clarifying-the-cache\/#primaryimage","url":"https:\/\/lh7-us.googleusercontent.com\/vPWSgRLuZKnvqxY2sj9M4oZlLr9XXVQVJvWFCui-vesFRuw04eQjmbQdFQGCKIYcc93rH0Zlwva3ivsl_QcC1fgU5iJ9o-PfQ5ZlTH7d7-1lOrAHHwXPKLpGHmDzj16_MVVhRhFrkkRS7ucFccNtITM","contentUrl":"https:\/\/lh7-us.googleusercontent.com\/vPWSgRLuZKnvqxY2sj9M4oZlLr9XXVQVJvWFCui-vesFRuw04eQjmbQdFQGCKIYcc93rH0Zlwva3ivsl_QcC1fgU5iJ9o-PfQ5ZlTH7d7-1lOrAHHwXPKLpGHmDzj16_MVVhRhFrkkRS7ucFccNtITM"},{"@type":"BreadcrumbList","@id":"https:\/\/wpengine.com\/builders\/wpgraphql-smart-cache-updates-clarifying-the-cache\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wpengine.com\/builders\/"},{"@type":"ListItem","position":2,"name":"WPGraphQL Smart Cache Updates: Clarifying The Cache"}]},{"@type":"WebSite","@id":"https:\/\/wpengine.com\/builders\/#website","url":"https:\/\/wpengine.com\/builders\/","name":"Builders","description":"Reimagining the way we build with WordPress.","publisher":{"@id":"https:\/\/wpengine.com\/builders\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpengine.com\/builders\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/wpengine.com\/builders\/#organization","name":"WP Engine","url":"https:\/\/wpengine.com\/builders\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/builders\/#\/schema\/logo\/image\/","url":"https:\/\/wpengine.com\/builders\/wp-content\/uploads\/2024\/05\/WP-Engine-Horizontal@2x.png","contentUrl":"https:\/\/wpengine.com\/builders\/wp-content\/uploads\/2024\/05\/WP-Engine-Horizontal@2x.png","width":348,"height":68,"caption":"WP Engine"},"image":{"@id":"https:\/\/wpengine.com\/builders\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/wpebuilders","https:\/\/www.youtube.com\/channel\/UCh1WuL54XFb9ZI6m6goFv1g"]},{"@type":"Person","@id":"https:\/\/wpengine.com\/builders\/#\/schema\/person\/bcdcb4ac0b215c34b6b30e440a24dc54","name":"Francis Agulto","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0c8a05c76944fc987d57296c96dc368055844527088c0aa44297edbfa8b82546?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0c8a05c76944fc987d57296c96dc368055844527088c0aa44297edbfa8b82546?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0c8a05c76944fc987d57296c96dc368055844527088c0aa44297edbfa8b82546?s=96&d=mm&r=g","caption":"Francis Agulto"},"description":"Fran Agulto is a Developer Advocate at WP Engine. He is a lover of all things headless WordPress, Rock Climbing, and overall being stoked for people that love what they do and share that stoke with others! Follow me on Twitter for cool stoked headless WP!","url":"https:\/\/wpengine.com\/builders\/author\/francis-agultowpengine-com-2-2-2-2-2-2-2-2-2-2-2-2\/"}]}},"_links":{"self":[{"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/posts\/31534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/comments?post=31534"}],"version-history":[{"count":0,"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/posts\/31534\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/media?parent=31534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/categories?post=31534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpengine.com\/builders\/wp-json\/wp\/v2\/tags?post=31534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}