{"id":4838,"date":"2021-05-28T18:55:50","date_gmt":"2021-05-28T18:55:50","guid":{"rendered":"https:\/\/www.s-sols.com\/?post_type=doc&#038;p=4838"},"modified":"2025-08-09T08:46:55","modified_gmt":"2025-08-09T08:46:55","slug":"settings-views-accel","status":"publish","type":"doc","link":"https:\/\/www.s-sols.com\/docs\/wordpress\/accelerator\/settings-accel\/settings-views-accel","title":{"rendered":"Different views cache settings Accelerator for WordPress"},"content":{"rendered":"<p>\n  The purpose of that settings is to provide correct caching of some environment depended on views such as current language, device type, etc. But excluding user-dependent data that can be tuned in the related setting\u2019s <a href=\".\/settings-users-accel\">part<\/a>.\n<\/p>\n<p style=\"text-align:center\">\n  <img decoding=\"async\" src=\"\/data\/content\/doc\/wordpress\/accelerator\/settings-views-accel\/settings-views-en.png\" alt=\"settings-Views\" title=\"settings-Views - Different views cache settings\" \/>\n<\/p>\n<h2><a id=\"general\"><\/a>General<br \/>\n<\/h2>\n<ul>\n<li><strong>Separate by below criterias<\/strong>\n<p style=\"text-align:left\">\n      Enables cache separation.\n    <\/p>\n<\/li>\n<\/ul>\n<h2><a id=\"devices\"><\/a>Device types<br \/>\n<\/h2>\n<p>\n  List of groups by a set of user-agents. Settings for each group:\n<\/p>\n<ul start=\"2\">\n<li><a id=\"devices_enable\"><\/a><strong>Enable<\/strong>\n<p style=\"text-align:left\">\n      Enables current group.\n    <\/p>\n<\/li>\n<li><a id=\"devices_name\"><\/a><strong>Name and slug<\/strong>\n<p style=\"text-align:left\">\n      Unique group name. <a id=\"devices_agents\"><\/a>This name is used to generate a slug when saving, which is used to name the caching directory and when adding <a href=\".\/settings-styles-accel#custom\">custom styles<\/a>.\n    <\/p>\n<\/li>\n<li><strong>Agents<\/strong>\n<p style=\"text-align:left\">\n      Only pages\u2019 requests having (case insensitive) these strings in their user-agents will be included. If string begins with one of <code>\/~@;%`#<\/code> it is interpreted as <a href=\".\/regexp-accel\">regular expression<\/a> with <a href=\".\/regexp-accel#conditions\">conditions<\/a>. E.g., user-agent\u2019s part can be compared by appending string with <code>=<\/code> or <code>!=<\/code> and exact value (with logical \u2018&amp;\u2019 operator as well) as in <a href=\"#parameters_cookie\">cookies<\/a> below. E.g. <code>!@\\Wchrome\/\\d+\\W@ &amp; @(?:\\W|^)safari\/[\\d\\.]+(?:\\W|$)@<\/code>. It can be added multiple items at once by placing each on new line.\n    <\/p>\n<\/li>\n<\/ul>\n<h2><a id=\"geo\"><\/a>Geo location<br \/>\n<\/h2>\n<h3>\n  General<br \/>\n<\/h3>\n<p>\n  It enables different cache for different regions. Without any defined groups it will just separate cache for all detected regions. To join cache of some regions there can be groups defined that is described below.\n<\/p>\n<p><strong>Note. <\/strong>If region can\u2019t be determined it is shown as symbol <code>^<\/code>.\n<\/p>\n<p><strong>Note.<\/strong> Getting <a href=\"https:\/\/developers.cloudflare.com\/network\/ip-geolocation\/\" rel=\"nofollow noopener\" target=\"_blank\">GEO location from CloudFlare<\/a> is supported. It is a first trying method to get region code. Then, if it is not detected, MaxMind database is used (<a href=\"https:\/\/woocommerce.com\/document\/maxmind-geolocation-integration\/#create-an-account-on-maxmind\" rel=\"nofollow noopener\" target=\"_blank\">License key of MaxMind<\/a> is required).\n<\/p>\n<p><strong>Note.<\/strong> When WooCommerce is active, MaxMind database from WooCommerce is used (properly filled &#8216;MaxMind Geolocation&#8217; in &#8216;WooCommerce&#8217; -&gt; &#8216;Settings&#8217; -&gt; &#8216;Integration&#8217; settings are required).\n<\/p>\n<h3>\n  Groups<br \/>\n<\/h3>\n<p>\n  Comparison is going from the first to the last group. If no any group found then particular region id is used. If the name is defined the it is shown in optimization queue in related column (otherwise, internal group ID is shown). First region in each group is forced country for current group.\n<\/p>\n<p>\n  Country codes should be typed as <a href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_ISO_3166_country_codes\" rel=\"nofollow noopener\" target=\"_blank\">two letter code (ISO 3166-1 alpha-2)<\/a>, e.g. US or LV, etc. <a href=\".\/regexp-accel#conditions\">Regular expressions<\/a> can be used here. E.g. expression <code>@^A@ &amp; !AU &amp; !@^AT$@<\/code> means to include all regions started with <code>A<\/code> and don\u2019t include <code>AU<\/code> and <code>AT<\/code> regions.  Or expression <code>!AB &amp; !CD &amp; !EF<\/code> includes all regions except <code>AB<\/code>, <code>CD<\/code> and <code>EF<\/code>.\n<\/p>\n<p><a id=\"_Hlk184672452\"><\/a><\/p>\n<p><strong>Note.<\/strong> First enabled group is always \u2018home\u2019 cache (it is warmed up while revalidation). E.g. undetermined region <code>^<\/code> can be added there to force using home region for undetermined ones.\n<\/p>\n<p><strong>Note.<\/strong> All available groups and regions (that are not included in defined groups) can be seen in <a href=\".\/status-and-operations-accel#operate_geos\">operate block<\/a>. And there can be seen the result filtering of all regions by defined groups.\n<\/p>\n<p><strong>Warning.<\/strong> While saving setting all defined groups are checked for having at least one simple defined region in each group. If it is not defined, it tries to add the first matched to group\u2019s conditions. If no region was assigned, the group is turned off due to it can\u2019t be detected. If it is found, it will be placed at first position in particular group expressions. Also, all simple defined regions corrected to uppercase.\n<\/p>\n<h2><a id=\"compat\"><\/a>Compatibility<br \/>\n<\/h2>\n<p><a id=\"parameters\"><\/a>List of groups by a set of user-agents, for which optimization will be performed in a compatible (sparing) mode. For example, the \u2018Lite optimization\u2019 group does not lazy load<span style=\"font-size:12pt\"> <\/span>CSS and<span style=\"font-size:12pt\"> <\/span>JS. And for \u2018Lite optimization with minimum HTML size\u2019 are not done<span style=\"font-size:12pt\"> <\/span>inline<span style=\"font-size:12pt\"> yet<\/span> images and styles to minimize<span style=\"font-size:12pt\"> <\/span>HTML<span style=\"font-size:12pt\"> size<\/span>. Settings for each group:\n<\/p>\n<ul start=\"5\">\n<li><a id=\"compat_enable\"><\/a><strong>Enable<\/strong>\n<p style=\"text-align:left\">\n      Enables current group.\n    <\/p>\n<\/li>\n<li><a id=\"compat_name\"><\/a><a id=\"compat_agents\"><\/a><strong>Agents<\/strong>\n<p style=\"text-align:left\">\n      Only pages\u2019 requests matching by these <a href=\".\/regexp-accel\">regular expressions<\/a> with <a href=\".\/regexp-accel#conditions\">conditions<\/a> in their user-agents will be included. E.g., user-agent\u2019s part can be compared by appending string with <code>=<\/code> or <code>!=<\/code> and exact value (with logical \u2018&amp;\u2019 operator as well) as in <a href=\"#parameters_cookie\">cookies<\/a> below. E.g. <code>!@\\Wchrome\/\\d+\\W@ &amp; @(?:\\W|^)safari\/[\\d\\.]+(?:\\W|$)@<\/code>. It can be added multiple expressions at once by placing each on new line.\n    <\/p>\n<\/li>\n<\/ul>\n<h2>\n  Parameters<br \/>\n<\/h2>\n<p>\n  A list of grouped parameters such as arguments and cookies. Settings for each item:\n<\/p>\n<ul>\n<li><strong>Enable\t<\/strong>\n<p style=\"text-align:left\">\n      Enables current item.\n    <\/p>\n<\/li>\n<li><strong>Only for fresh parts<\/strong>\n<p style=\"text-align:left\">\n      It is applied only for fresh parts requests. It is useful when, for example, only a certain element depends on some additional parameters and so that these parameters work only for small blocks, this approach is used.\n    <\/p>\n<\/li>\n<li><strong>Group name\t<\/strong>\n<p style=\"text-align:left\">\n      Unique group name.\n    <\/p>\n<\/li>\n<li><a id=\"parameters_cookie\"><\/a><strong>URI exclusions<\/strong>\n  <\/li>\n<li><strong>Cookies<\/strong>\n<p style=\"text-align:left\">\n      Only pages\u2019 requests having cookie names that begin with any of the specified strings will be included. If name begins with one of <code>\/~@;%`#<\/code> it is interpreted as <a href=\".\/regexp-accel\">regular expression<\/a> with <a href=\".\/regexp-accel#conditions\">conditions<\/a>. E.g., cookie\u2019s value can be compared by appending name with <code>=<\/code> or <code>!=<\/code> and exact value (with logical \u2018&amp;\u2019 operator as well). E.g. <code>@^cookie_1$@ = v1 &amp; @^cookie_2$@ != v2<\/code> means that cookies <code>cookie_1<\/code> and<code> cookie_2<\/code> will be used only if <code>cookie_1<\/code> equals to <code>v1<\/code> and<code> cookie_2<\/code> not equal to <code>v2<\/code>. Also, you can check the cookie for the absence or empty value by prepending name with <code>!<\/code>, for example,<span style=\"font-size:12pt\"> <\/span><code>!@^cookie_1$@<\/code>. It can be added multiple items at once by placing each on new line.\n    <\/p>\n<\/li>\n<li><strong>Headers<\/strong>\n  <\/li>\n<li><strong>URI arguments<\/strong>\n<p style=\"text-align:left\">\n      Only pages\u2019 URLs having arguments that begin with any of the specified strings will be included. It can be added multiple strings at once via separating by commas.\n    <\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>The purpose of that settings is to provide correct caching of some environment depended on views such as current language, device type, etc. But excluding user-dependent data that can be tuned in the related setting\u2019s part. General Separate by below criterias Enables cache separation. Device types List of groups by a set of user-agents. Settings&#8230;<\/p>\n","protected":false},"author":18,"featured_media":0,"parent":4812,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"rank_math_lock_modified_date":false},"categories":[816],"tags":[],"class_list":["post-4838","doc","type-doc","status-publish","hentry","category-accelerator"],"_links":{"self":[{"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/doc\/4838","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/doc"}],"about":[{"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/types\/doc"}],"author":[{"embeddable":true,"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/comments?post=4838"}],"up":[{"embeddable":true,"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/doc\/4812"}],"wp:attachment":[{"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/media?parent=4838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/categories?post=4838"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.s-sols.com\/api\/wp\/v2\/tags?post=4838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}