{"id":18784,"date":"2020-02-26T13:29:01","date_gmt":"2020-02-26T18:29:01","guid":{"rendered":"https:\/\/www.boldgrid.com\/support\/?p=18784"},"modified":"2024-02-22T09:57:15","modified_gmt":"2024-02-22T14:57:15","slug":"choosing-a-fragment-caching-method-for-w3-total-cache","status":"publish","type":"post","link":"https:\/\/www.boldgrid.com\/support\/w3-total-cache\/choosing-a-fragment-caching-method-for-w3-total-cache\/","title":{"rendered":"Choosing a Fragment Caching Method for W3 Total Cache"},"content":{"rendered":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\">\n<?xml encoding=\"utf-8\" ?><html><body><p><b>Fragment Caching<\/b> is similar to <b>Object Caching<\/b>, in that it assists in improving performance by reducing the total number of database queries required to generate pages for many users. This works by freeing up MySQL server resources taken by serving repeated queries returning the same data each time, so that it has more power to handle real dynamic data.<\/p>\n<div class=\"boldgrid-section\" style=\"margin-top: 60px;\">\n<div class=\"container w3tc-radius\" style=\"border-width: 0px; background-image: url('https:\/\/www.boldgrid.com\/wp-content\/uploads\/2023\/07\/upsell-darker-alt.png'); background-size: cover; background-position: 50% 5%;\" data-image-url=\"https:\/\/www.boldgrid.com\/wp-content\/uploads\/2023\/07\/upsell-darker-alt.png\">\n<div class=\"row upsell-column\" style=\"padding-top: 2em; padding-bottom: 2em; color: #ffffff;\">\n<div class=\"col-lg-1 col-md-1 col-sm-12 col-xs-12 hidden-sm\"><\/div>\n<div class=\"col-lg-5 col-md-6 col-xs-12 col-sm-7\">\n<p class=\"\" style=\"color: #ffffff; margin-top: 0;\">Unlock dynamic Fragment Caching with <strong>W3 Total Cache Pro<\/strong>.<\/p>\n<\/div>\n<div class=\"col-lg-6 col-md-5 col-sm-5 col-xs-12 text-center align-column-center\">\n<p class=\"\" style=\"border-width: 0px;\"><a class=\"button-w3tc-white\" style=\"border: 2px solid #30BEC4; font-size: 18px; padding: 15px 30px;\" href=\"https:\/\/www.boldgrid.com\/w3-total-cache\/#pricing\">View Plans<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h3 id=\"shared-server\">Shared Server<\/h3>\n<p>In shared hosting platforms, you may only be able to cache files to a disk. In such cases, there is only one option available for Object Caching unless your hosting provider has a method listed under VPS \/ Dedicated Server or Multiple Servers available.<\/p>\n<h4 id=\"disk\">Disk<\/h4>\n<p>Disk-based caching stores the Objects to a folder within wp-content\/cache as a file or set of files. Disk-based object caching is generally not recommended unless you are caching a small number of objects that are not likely to change often.<\/p>\n<h4 id=\"caveats\">Caveats<\/h4>\n<h3 id=\"vps--dedicated-server\">VPS \/ Dedicated Server<\/h3>\n<h4 id=\"alternative-php-cache-apc--apcu\">Alternative PHP Cache (APC \/ APCu)<\/h4>\n<p><b>APC<\/b> refers to <b>Alternative PHP Cache<\/b> which provides in-memory Opcode caching and a key-value store for looking up cached items. This is largely deprecated in favor of modern Opcode Caching mechanisms, as <b>APC<\/b> is not supported in the PHP 7.x branch.<\/p>\n<p><b>APCu<\/b> is similar to <b>APC<\/b>, though in order to support modern variants of PHP it is stripped of Opcode Caching and only provides the in-memory key-value store mechanisms. When paired with modern Opcode Caching mechanisms it can provide the functionality originally provided by <b>APC<\/b>, though it should only be used when you require having a limited cache size.<\/p>\n<p>APC\/APCu is not stable when a lot of memory allocated. In cases where you are caching a small amount of data, <b>APC\/APCu<\/b> may be the ideal method for single-instance hosting platforms such as <a href=\"\/wordpress-vps-hosting\/\">WordPress VPS<\/a> or Dedicated hosting.<\/p>\n<h4 id=\"eaccelerator\">eAccelerator<\/h4>\n<p><b>eAccelerator<\/b> is an in-memory Opcode caching solution that supports the PHP 4.x and 5.x major versions. This is largely deprecated in favor of modern Opcode Caching mechanisms, as <b>eAccelerator<\/b> is not supported in the PHP 7.x branch.<\/p>\n<h4 id=\"xcache\">XCache<\/h4>\n<p>XCache is an in-memory Opcode caching solution that supports up to the PHP 5.6 release. This is largely deprecated in favor of modern Opcode Caching mechanisms, as <b>XCache<\/b> is not supported in the PHP 7.x branch.<\/p>\n<h4 id=\"wincache-recommended-for-windows-based-environments\">WinCache (Recommended for Windows-based Environments)<\/h4>\n<p><b>WinCache<\/b> is an extension for Microsoft IIS which provides in-memory Opcode caching and currently supports up to IIS 10 as of 04\/30\/2019. Check the official Microsoft product page for the latest information.<\/p>\n<h4 id=\"caveats\">Caveats<\/h4>\n<h3 id=\"multiple-servers\">Multiple Servers<\/h3>\n<p>If you have multiple hosting plans where one plan has root-level access, or if your hosting provider offers addons or bundles providing one of the following solutions, you may offload your in-memory caching to another server. This allows you to separate your actual site and caching solution between multiple servers to compliment each other, and allows for easier scaling to serve many users.<\/p>\n<h4 id=\"memcached\">Memcached<\/h4>\n<p><b>Memcached<\/b> is a high-performance, distributed memory object caching system meant to speed up dynamic web applications by alleviating database load. It provides an in-memory key-value store for small chunks of arbitrary data (strings, objects) from the results of database calls, API calls, or page rendering.<\/p>\n<p><b>Memcached<\/b> is ideal for relatively small and static data, and as a result may be more efficient than Redis<b>. <\/b>It is also multithreaded, which may be a benefit when using a VPS or Dedicated Server with a large resource pool.<\/p>\n<h2 id=\"frequently-asked-questions\">Frequently Asked Questions<\/h2>\n<h3 id=\"enabling-fragment-caching-didnt-improve-my-performance\">Enabling Fragment Caching didn&rsquo;t improve my performance<\/h3>\n<p>Fragment Caching can help when there is a lot of dynamic content that Object\/Database caching can&rsquo;t resolve, though it requires a developer to tag content in pages. If you do not tag your page fragments, enabling Fragment Caching will have no effect.<\/p>\n<\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>Fragment Caching is similar to Object Caching, in that it assists in improving performance by reducing the total number of database queries required to generate pages for many users. This works by freeing up MySQL server resources taken by serving repeated queries returning the same data each time, so that it has more power to [&hellip;]<\/p>\n","protected":false},"author":529,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"bgseo_title":"","bgseo_description":"","bgseo_robots_index":"index","bgseo_robots_follow":"follow","footnotes":""},"categories":[749,692],"tags":[],"class_list":["post-18784","post","type-post","status-publish","format-standard","hentry","category-fragment-cache","category-w3-total-cache"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/18784","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/users\/529"}],"replies":[{"embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/comments?post=18784"}],"version-history":[{"count":7,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/18784\/revisions"}],"predecessor-version":[{"id":125521,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/18784\/revisions\/125521"}],"wp:attachment":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/media?parent=18784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/categories?post=18784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/tags?post=18784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}