{"id":8491,"date":"2022-09-02T11:39:06","date_gmt":"2022-09-02T11:39:06","guid":{"rendered":"https:\/\/clustercs.com\/kb\/?docs=docly-documentation\/speed-optimizations\/actions\/speed-engine-cache-with"},"modified":"2022-09-05T10:14:23","modified_gmt":"2022-09-05T10:14:23","slug":"speed-engine-cache-with","status":"publish","type":"docs","link":"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/speed-engine-cache-with\/","title":{"rendered":"Speed Engine \u2013 Cache With"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>Caching is a great improvement for your web site speed. In most cases, it achieves instantly visible speed gains and great advantages in SEO rankings. ClusterCS offers two caching engines: Varnish and NGINX. Depending on your decision or received recommendations you can use either of them with great trust. Same automation features have been implemented for both systems, so you can obtain quick advantages with a few clicks for many scenarios.<\/p>\n\n\n\n<p>You can have multiple \u201cCache With\u201d rules for a domain and you can customize the settings for each zone individually.<\/p>\n\n\n\n<p>Let\u2019s take an example of WordPress caching rule and discuss the available options.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/clustercs.com\/oldkb\/wp-content\/uploads\/2018\/11\/WordPress-caching-rule-and-discuss-the-available-options-535x1024.png\"><img decoding=\"async\" src=\"https:\/\/clustercs.com\/oldkb\/wp-content\/uploads\/2018\/11\/WordPress-caching-rule-and-discuss-the-available-options-535x1024.png\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<p>First, we select the caching engine Varnish or NGINX.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u201cuse backend\u201d defines the backend web service where the selected caching engine will proxy requests to.<\/li><li>\u201cload balanced\u201d refers to cluster environments when multiple servers are associated with the backend service. In a load balanced scenario, the caching engine will forward requests in a rotation (round robin) to all the available backend service servers. When \u201cload balanced\u201d is disabled and the caching engine is found on the same server with the backend service, it will forward the request locally to that server. When such a proximity is not available, it would revert to act as if \u201cload balanced\u201d is set to on. In single server cases, this setting is ignored.<\/li><li>\u201cstickiness cookie\u201d is available to clustered backend web service as well. Sometimes it is required that once a user hits a backend, he will always be sent to that backend (for example to keep a logged in session to the same server). In single server cases, this setting is ignored.<\/li><li>\u201cClear cache zone path\u201d provides a mechanism for clearing the cache for the requests cached by this rule. This setting is only enabled when a main \u201cClear Cache\u201d rule is defined and both definitions must contain a valid path. The URL to trigger a clear cache for this zone is built based on the main \u201cClear Cache\u201d URL to which this path is added. Since ClusterCS handles both single servers and clusters, a clear cache action may require the cache to be cleared on more than one server. ClusterCS facilitates this by generating links which automatically cycles through the caching engines (servers) involved in the rule. This link can be triggered in a browser for an easy clear cache mechanism. This is especially useful when doing development and frequent clear cache actions are required. For environments when a programmatic trigger of clear cache is required, ClusterCS generates a link which provides a json that helps build the required individual URLs to trigger the clear cache action on all the involved servers. These links (both website and json) can be retrieved by clicking the \u201cGet Links\u201d button. Please remember that zone clear cache will not be available unless main \u201cClear Cache\u201d rule is present. The \u201cClear Cache\u201d rule is there to provide a mechanism for protecting your clear cache mechanisms from outside world. For more information on \u201cClear Cache\u201d rule please read this article &lt;Clear Cache link&gt;. For your own security, always customize the clear cache paths and don\u2019t use the default paths provided and use IP protection conditions in the \u201cClear Cache\u201d rule or any other conditions that can prevent outside triggers to the clear cache links.<\/li><li>\u201cCache expiration per response code\u201d allows you to set specific timers for expiration based on response codes. You can add, remove and customize response codes as necessary.<\/li><li>\u201cCache URL includes schema\u201d allows creating of separate cache files for http and https links.<\/li><li>\u201cCache URL includes query string\u201d defines the behavior when creating a unique cache key per request. If disabled, anything in the request URL past the \u2018?\u2019 sign is ignored, and a single cache file is created and served for any parameters that may show up after \u2018?\u2019. When enabled, the cache key will observer the query string parameters as well based on exclusions or inclusions lists.<\/li><li>\u201cCache URL params list\u201d defines whether to use the excluded or included list logic on the server.<\/li><li>\u201cCache URL exclude params list\u201d allows the definition of query string parameters (what follows \u2018?\u2019 in the URL) that can be ignored when creating a unique cache file. Any other parameters not included in this list will be part of the unique cache key of the file. The default parameters handle the cases of Goggle Analytics campaigns which in general have no meaning for your backend script and would highly disrupt your caching mechanism effectiveness. For this list to be active on the server settings, \u201cCache URL exclude params list\u201d must be set to \u201cexcluded list\u201d.<\/li><li>\u201cCache URL included params list\u201d allows you to define the only query string parameters that matter to your script (anything that would mean a different content should be generated by the backend service). For this list to be active on the server settings, \u201cCache URL exclude params list\u201d must be set to \u201cincluded list\u201d<\/li><\/ul>\n\n\n\n<p>Only one of the \u201cexcluded list\u201d or \u201cincluded list\u201d can be active at one time as they are logically mutually exclusive. If you are required to have absolutely all query string parameters accounted for, you can select \u201cexcluded list\u201d for \u201cCache URL params list\u201d and clear the corresponding \u201cCache url exclude params list\u201d box for any parameters (leave it empty).<\/p>\n\n\n\n<p>NGINX used as a caching engine or as a backend web service can be further customized by using the associated \u201cCustomize\u201d link when selected that exposes the generated config file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Caching is a great improvement for your web site speed. In most cases, it achieves instantly visible speed gains and great advantages in SEO rankings. ClusterCS offers two caching engines: Varnish and NGINX. Depending on your decision or received recommendations you can use either of them with great trust. Same automation features have been implemented [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":8489,"menu_order":2,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-8491","docs","type-docs","status-publish","hentry","no-post-thumbnail"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Speed Engine \u2013 Cache With - ClusterCS Knowledge Base<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/speed-engine-cache-with\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Speed Engine \u2013 Cache With - ClusterCS Knowledge Base\" \/>\n<meta property=\"og:description\" content=\"Caching is a great improvement for your web site speed. In most cases, it achieves instantly visible speed gains and great advantages in SEO rankings. ClusterCS offers two caching engines: Varnish and NGINX. Depending on your decision or received recommendations you can use either of them with great trust. Same automation features have been implemented [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/speed-engine-cache-with\/\" \/>\n<meta property=\"og:site_name\" content=\"ClusterCS Knowledge Base\" \/>\n<meta property=\"article:modified_time\" content=\"2022-09-05T10:14:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/clustercs.com\/oldkb\/wp-content\/uploads\/2018\/11\/WordPress-caching-rule-and-discuss-the-available-options-535x1024.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/speed-engine-cache-with\/\",\"url\":\"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/speed-engine-cache-with\/\",\"name\":\"Speed Engine \u2013 Cache With - ClusterCS Knowledge Base\",\"isPartOf\":{\"@id\":\"https:\/\/clustercs.com\/kb\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/speed-engine-cache-with\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/speed-engine-cache-with\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/clustercs.com\/oldkb\/wp-content\/uploads\/2018\/11\/WordPress-caching-rule-and-discuss-the-available-options-535x1024.png\",\"datePublished\":\"2022-09-02T11:39:06+00:00\",\"dateModified\":\"2022-09-05T10:14:23+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/speed-engine-cache-with\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/speed-engine-cache-with\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/speed-engine-cache-with\/#primaryimage\",\"url\":\"https:\/\/clustercs.com\/oldkb\/wp-content\/uploads\/2018\/11\/WordPress-caching-rule-and-discuss-the-available-options-535x1024.png\",\"contentUrl\":\"https:\/\/clustercs.com\/oldkb\/wp-content\/uploads\/2018\/11\/WordPress-caching-rule-and-discuss-the-available-options-535x1024.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/speed-engine-cache-with\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/clustercs.com\/kb\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ClusterCS Documentation\",\"item\":\"https:\/\/clustercs.com\/kb\/docs\/clustercs\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Speed Optimizations\",\"item\":\"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Actions\",\"item\":\"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Speed Engine \u2013 Cache With\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/clustercs.com\/kb\/#website\",\"url\":\"https:\/\/clustercs.com\/kb\/\",\"name\":\"ClusterCS Knowledge Base\",\"description\":\"Welcome to ClusterCS Documentation\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/clustercs.com\/kb\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Speed Engine \u2013 Cache With - ClusterCS Knowledge Base","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:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/speed-engine-cache-with\/","og_locale":"en_US","og_type":"article","og_title":"Speed Engine \u2013 Cache With - ClusterCS Knowledge Base","og_description":"Caching is a great improvement for your web site speed. In most cases, it achieves instantly visible speed gains and great advantages in SEO rankings. ClusterCS offers two caching engines: Varnish and NGINX. Depending on your decision or received recommendations you can use either of them with great trust. Same automation features have been implemented [&hellip;]","og_url":"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/speed-engine-cache-with\/","og_site_name":"ClusterCS Knowledge Base","article_modified_time":"2022-09-05T10:14:23+00:00","og_image":[{"url":"https:\/\/clustercs.com\/oldkb\/wp-content\/uploads\/2018\/11\/WordPress-caching-rule-and-discuss-the-available-options-535x1024.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/speed-engine-cache-with\/","url":"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/speed-engine-cache-with\/","name":"Speed Engine \u2013 Cache With - ClusterCS Knowledge Base","isPartOf":{"@id":"https:\/\/clustercs.com\/kb\/#website"},"primaryImageOfPage":{"@id":"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/speed-engine-cache-with\/#primaryimage"},"image":{"@id":"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/speed-engine-cache-with\/#primaryimage"},"thumbnailUrl":"https:\/\/clustercs.com\/oldkb\/wp-content\/uploads\/2018\/11\/WordPress-caching-rule-and-discuss-the-available-options-535x1024.png","datePublished":"2022-09-02T11:39:06+00:00","dateModified":"2022-09-05T10:14:23+00:00","breadcrumb":{"@id":"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/speed-engine-cache-with\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/speed-engine-cache-with\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/speed-engine-cache-with\/#primaryimage","url":"https:\/\/clustercs.com\/oldkb\/wp-content\/uploads\/2018\/11\/WordPress-caching-rule-and-discuss-the-available-options-535x1024.png","contentUrl":"https:\/\/clustercs.com\/oldkb\/wp-content\/uploads\/2018\/11\/WordPress-caching-rule-and-discuss-the-available-options-535x1024.png"},{"@type":"BreadcrumbList","@id":"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/speed-engine-cache-with\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/clustercs.com\/kb\/"},{"@type":"ListItem","position":2,"name":"ClusterCS Documentation","item":"https:\/\/clustercs.com\/kb\/docs\/clustercs\/"},{"@type":"ListItem","position":3,"name":"Speed Optimizations","item":"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/"},{"@type":"ListItem","position":4,"name":"Actions","item":"https:\/\/clustercs.com\/kb\/docs\/clustercs\/speed-optimizations\/actions\/"},{"@type":"ListItem","position":5,"name":"Speed Engine \u2013 Cache With"}]},{"@type":"WebSite","@id":"https:\/\/clustercs.com\/kb\/#website","url":"https:\/\/clustercs.com\/kb\/","name":"ClusterCS Knowledge Base","description":"Welcome to ClusterCS Documentation","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/clustercs.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"acf":[],"_links":{"self":[{"href":"https:\/\/clustercs.com\/kb\/wp-json\/wp\/v2\/docs\/8491","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/clustercs.com\/kb\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/clustercs.com\/kb\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/clustercs.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/clustercs.com\/kb\/wp-json\/wp\/v2\/comments?post=8491"}],"version-history":[{"count":1,"href":"https:\/\/clustercs.com\/kb\/wp-json\/wp\/v2\/docs\/8491\/revisions"}],"predecessor-version":[{"id":8683,"href":"https:\/\/clustercs.com\/kb\/wp-json\/wp\/v2\/docs\/8491\/revisions\/8683"}],"up":[{"embeddable":true,"href":"https:\/\/clustercs.com\/kb\/wp-json\/wp\/v2\/docs\/8489"}],"wp:attachment":[{"href":"https:\/\/clustercs.com\/kb\/wp-json\/wp\/v2\/media?parent=8491"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/clustercs.com\/kb\/wp-json\/wp\/v2\/doc_tag?post=8491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}