Frequently asked questions

What Page Cache warmer does?

Page Cache Warmer is a crawler (powered by Magento Cron job) which visits uncached pages like user and adds those pages to the cache. More pages will be in cache, more faster will be store in a whole.

It can be used either by Magento standard Cache or Varnish. It also works with other cache types (like Redis) without any problem.

Note

If you use Varnish, please, make sure, that it is configured correctly. Refer here for more info.

What can I do if all pages have "Pending" status?

Our extension will work with your store only if Varnish is configured correctly or if you had switched caching mode to Built-in. This mode is governed by STORES -> Configuration -> ADVANCED -> System -> Full Page Cache -> Caching Application option, which can have two cases:

Case 1: Varnish:

  1. If you had set caching mode to Varnish Cache (Recommended), make sure, that Varnish is installed on server. Use this command for that: varnishd -V.

    If result is correct you should see varnish version, as shown below. varnishd_v.png

  2. Switch caching mode to Built-in mode and set Show cache status to Yes at STORES -> Configuration -> Mirasvit Extensions -> Page Cache Warmer -> Debug section. It will show, whether your pages are actually cached. If you visit frontend Category or Product page, you should see Page Hit message, as shown below:

    hit.png

    If the page is not cached, you will see Page Miss, and a list of not cacheable blocks:

    miss_blocks.png

    In this case refer to How can I make pages cacheable? section for further actions.

  3. If you see Page Hit on most pages, then most likely Varnish is not configured to work with magento. You can check using this way.

Case 2: Built-in Cache:

  1. If you had set caching mode to Built-in Cache, then set Show cache status to Yes at STORES -> Configuration -> Mirasvit Extensions -> Page Cache Warmer -> Debug section.
  2. Visit frontend Category or Product pages of your store to check, whether they're actually cached.
  3. If you see there Page Miss, you need to fix caching settings. Refer to How can I make pages cacheable? for further steps.

How to check if my pages are cacheable?

  1. Switch store to Built-in Cache at STORES -> Configuration -> ADVANCED -> System -> Full Page Cache -> Caching Application, and set Show cache status to Yes, as in previous case.
  2. Visit frontend Category or Product pages of your store to check, whether they're actually cached. If the page is cached, you will see Page Hit message, as shown below:

    hit.png

    If you see Page Miss message, with list of not cached blocks, as shown below

    miss_blocks.png

    Then the pages are not actually cached. Refer to How can I make pages cacheable? section for further steps.

How can I make pages cacheable?

Variant 1 (from version 1.1.21)

  1. Make sure, that page is not cached, using Show cache status option, set to Yes, and special infobox, which appears after it:

    miss_blocks.png

  2. Set Forcibly make pages cacheable option to Yes, at Stores -> Configuration -> Mirasvit Extensions -> Page Cache Warmer -> Extended Settings.

  3. Purge ALL in Cache Management and revisit page with Show cache status still enabled. You should see Page Hit message:

    hit.png

Variant 2

  1. Make sure, that page is not cached, using Show cache status option, set to Yes, and special infobox, which appears after it:

    miss_blocks.png

  2. Connect to your server via SSH, and run the following command:

    grep -r "[your_block_name].*cacheable" * --include="*.xml"

    where [your_block_name] is block, which you can pick in section Not cacheable blocks. It will give you the list of layout files, that govern that block.

    Example

    Typical SSH session with layout files listing shall look like below. Let the block name is authorization-link-login

    cd [magento_root_folder]/app/code
    grep -r "authorization-link-login.*cacheable" * --include="*.xml"
    
    cd [magento_root_folder]/app/design
    grep -r "authorization-link-login.*cacheable" * --include="*.xml"

    Output should look like this:

    [custom_theme]/Magento_Customer/layout/default.xml  <block class="Magento\Customer\Block\Account\AuthorizationLink" name="authorization-link-login" cacheable="false" template="account/link/authorization.phtml"/>

  3. Make sure, that layout does not forbid caching explicitly.

    Open files, which you had obtained in previous step, and search for block record, which should have the following expression in its header:

    name="BLOCK_NAME"

    BLOCK_NAME is the same name, as in previous step. Remove attribute cacheable="false" from that record, if it exists.

  4. Purge ALL in Cache Management and revisit page with Show cache status still enabled. You should see Page Hit message:

    hit.png

How can I stop cache flushing?

Our Cache Warmer extension do not have means for cache flushing.

However, you can see, how often your store's cache is flushed using Fill Rate graph, available at System -> Page Cache Warmer -> Pages.

fill_rate.png

If flushing is performed too often, you can use logs to see its reasons. To enable the, use options below at Stores -> Configuration -> Mirasvit Extensions -> Page Cache Warmer -> Debug section:

  • Log tags for cache flushing - puts to the log each flush schedule.
  • Log backtrace for cache flushing - puts to the log modules, which start flushing.

Result will be recorded to the file /var/log/clean.log.

The most origin of flushing are reindex (FPC also flushes cache on reindexing), or re-saving products (FPC also flushes frontend pages, which are associated with product).

Products also can be manipulated using external WebAPI services, which also save them, and thus - trigger cache flushing.

In the latter and similar cases you need to configure your system to not save products too often and trigger reindex not more than once per day.

If it is impossible for some reason, you can disable flushing completely by setting Forbid cache flushing option to Yes, at Stores ->Configuration -> Mirasvit Extensions -> Page Cache Warmer -> Extended Settings.

Note

If you had enabled Forbid cache flushing, changes at Category and Product pages won't apply unless you manually purge cache from System -> Cache Management, or cache will expiry (depends from TTL set in Magento settings).

How can I control average system load?

Our extension do not have means for system load balancing.

But at SYSTEM->Page Cache Warmer->Jobs we have graph Average system load, which will help you to discover bottlenecks.

avg_system_load.png

You can also reduce system load by setting threshold limit for Cache Warmer jobs with option Don't run warmer job if average system load more than (%) at Stores ->Configuration -> Mirasvit Extensions -> Page Cache Warmer -> Extended Settings section.

If this option is set, whenever warming jobs are started, our extension will check current load level, and if will be equal or greater than entered load percentage - jobs won't start.

Recommended values for this option - 70 or 80.