Troubleshooting - Full Page Cache

How to check if the FPC extension is fully working?

1) Go to the following directories and check if these options are enabled:
System->Full Page Cache->General Settings->Enabled = Yes
System->Full Page Cache->Crawler Settings->Enabled = Yes
System->Cache Management->Cache Storage Management->Full Page Cache = Enabled
System->Full Page Cache->Debug->Show Time Stats = Yes
System->Full Page Cache->Debug->Show debug hints only for = [your_IP] (Sometimes it may not work if the server always returns 127.0.0.1. In this case, leave this field blank)

2) After enabling all system settings walk through the pages of the site for 15 minutes and you will see the visited pages here: System-> Full Page Cache-> Crawler URLs
If visited pages are not shown in the list, you need check if cron works.
As example, if cron set up to execute every 5 minutes (*/5****), at the Crawler URLs page time at the Last cron run time should be changed every 5 minutes. If this does not happen, cron is not configured at your store.

3) After enabling System->Full Page Cache->Debug->Show Time Stats = Yes, you will be enable to see Cache status directly on the store page.
Open any store page and you will see the time stats (Response time) and Cache status. If Cache status Cache Hit - page is in the cache, if Cache Miss - page is not in the cache.


How can I create optimal FPC settings for maximal result?

Optimal FPC settings for for current store configuration you can see in System->Full Page Cache->Suggest Optimal Configuration

1.) REDIS has to be installed on server (root ssh access needed) and magento has to be configured to use REDIS. You can learn more about it here: How to configure REDIS.

2.) In FPC configuration (System->Full Page Cache->General Settings) set Cache Lifetime (sec) = 604800 (7 days) and Flush Cache Expr = empty

3.) In FPC Crawler configuration (System->Full Page Cache Crawler->Crawler Settings and System->Full Page Cache Crawler->Crawler for logged user) set Limit of Crawled URLs per Run = 10 and Schedule = */5 * * * *

Install OAE Scheduler https://github.com/AOEpeople/Aoe_Scheduler In time line you will see proccess fpc_crawler and fpc_crawlerlogged. You'll need to increase "Limit of Crawled URLs per Run" such way that 5 minutes will be enough for crawl (maybe it will 10,20 or 500).

4.) In ignored pages (System->Full Page Cache->Crawler Settings->Extended crawler setting->Crawler Ignored Pages) you can optionally add /\?[^p][^=]*/ If so, FPC will add in crawler only urls like: http://example.com/url, http://example.com/url?p=n FPC crawler will ignore pages urls like http://example.com/url?param1=n&m2=n. This way FPC will keep in cache only more visited pages.


What actions should be defined if we need to cache the checkout steps?

Extension does not cache checkout page. There are a lot of unique information that must be excluded, so it does not make sense to cache it.


Does the Cloudfront CDN module works fine with FPC extension?

FPC extension works correctly with Cloudfront CDN module without ant additional configuration.


Extension does not cache some block(s) correctly

You need to describe those block(s) in the file custom.xml. Check it here: How to add custom dynamic block


How can I add to cache AW Blog?

You need to add in "Cachable Actions" blog/post_view, blog/index_list and add a line "protected $_cacheTag = 'AW_BLOG_POST';" in a file /app/code/community/AW/Blog/Model/Post.php.


How can I add to cache 'customer', 'wishlist', 'checkout', 'sales' pages?

You can't add to cache 'customer', 'wishlist', 'checkout', 'sales' pages, because there are always changed information on these pages.


How can I add to cache 'review', 'tag' or any other page?

You need to add in "Cachable Actions" review/product_list and tag/product_list. The same way you can add any other page. For more information, check description and example of the Cacheable Actions on the Configure a Full Page Cache page.


How can I configure FPC for separated magento installation (admin panel use one server and frontend use other server)?

1.) Go to System->Full Page Cache->Crawler Settings->Extended crawler setting and set "Add crawled ulrs directly in database = Yes"

2.) Install REDIS on server and configure it in local.xml. You can learn more about it here: How to configure REDIS

3.) In Redis configuration (app/etc/local.xml file) add id_prefix

  • REDIS configuration with id_prefix

    <cache>
        <id_prefix><![CDATA[bs8_]]></id_prefix>
        <backend>Cm_Cache_Backend_Redis</backend>
        <backend_options>
            <server>127.0.0.1</server>
            <port>6379</port>
            <database>0</database>
            <password></password>
            <force_standalone>0</force_standalone>
            <connect_retries>3</connect_retries>
            <automatic_cleaning_factor>0</automatic_cleaning_factor>
            <compress_data>1</compress_data>
            <compress_tags>1</compress_tags>
            <compress_threshold>20480</compress_threshold>
            <compression_lib>gzip</compression_lib>
            <persistent>1</persistent>
        </backend_options>
    </cache>

    ~! Please note that after installation sets default port number, but if its different, you should set correct port number of your hosting account.


I use 'redis-cli ping' and get an error "(error) NOAUTH Authentication required". How can I fix it?

1.) Disable FPC in cache management.

2.) Comment redis cache in /app/etc/local.xml

3.) Set password in your config file present at /etc/redis. You need to set requirepass "[your_password]" ( [your_password] - it is custom password for redis ) in that file under ########### SECURITY ############ section.

4.) To stop REDIS use command "killall redis-server" or restart server

5.) Then start your redis server: sudo service redis-server start or sudo service redis_6379 start

6.) In file /app/etc/local.xml comment out REDIS cache section and add password in password redis section (change [your_password] at password which was added in redis config in step 3):

<password><![CDATA[[your_password]]]></password>

Cron error issue with APC cache:

Exception 'Zend_Cache_Exception' with message 'can't get apc memory size' in /var/www/lib/Zend/Cache.php:209

Open the apc configuration file.
This file can be placed at different locations depending on the store configuration, for example at /etc/php.d/apc.ini, /etc/php5/conf.d/apc.ini, etc.
To find location of the apc configuration file, use next command at the command line:

php -i | grep "apc"

Open the apc configuration file and add these lines:

apc.enabled = 1
apc.enable_cli = 1

Restart Apache server.


GoMage Procart compatibility ( from version 1.0.42 )

1.) Set in Full Page Cache configuration (System->Full Page Cache->Settings->Extended setting) "Update cart method = Whole page".
2.) Add in file /app/code/local/Mirasvit/Fpc/etc/custom.xml folllowing tags:

    <?xml version="1.0" encoding="UTF-8"?>
    <config>
        <containers>
            <gomage_procart_config>
                <block>gomage_procart/config</block>
                <name>gomage.procart.config</name>
                <container>Mirasvit_Fpc_Model_Container_Base</container>
                <depends></depends>
                <in_register>current_category,current_product</in_register>
                <in_app>false</in_app>
            </gomage_procart_config>
            <gomage_procart_product_view>
                <block>gomage_procart/product_view</block>
                <name>gomage.procart.product.view</name>
                <container>Mirasvit_Fpc_Model_Container_Base</container>
                <depends></depends>
                <in_app>false</in_app>
            </gomage_procart_product_view>
            <gomage_procart_product_list>
                <block>gomage_procart/product_list</block>
                <name>gomage.procart.product.list</name>
                <container>Mirasvit_Fpc_Model_Container_Base</container>
                <depends></depends>
                <in_app>false</in_app>
            </gomage_procart_product_list>
        </containers>
    </config>

3.) Refresh all cache.


Is there any way to flush products by ID as we update prices from our accounting software?

if "Cache Level = Minimal set of tags with custom prefix" you can use following code: $tags = array('MVCATALOG_PRODUCT_4038', 'MVCATALOG_PRODUCT4037');
Mage::getSingleton('fpc/cache')->clearCacheByTags($tags);
with other Cache Level configuration you can use this code:
$tags = array('CATALOG_PRODUCT_4038', 'CATALOG_PRODUCT_4037');
Mage::getSingleton('fpc/cache')->clearCacheByTags($tags);
4038 and 4037 it is product ids.
Also you can use Mirasvit_Fpc_Model_Cache::clearCacheByTags($tags) instead Mage::getSingleton('fpc/cache')->clearCacheByTags($tags)


I have strange frontend errors {magicshop/ajaxcart_top.Js} after FPC Installation.

Please, check full text of the error, it should look like this:

    <[!--{magicshop/ajaxcart_top.Js}--]> <[!--/{magicshop/ajaxcart_top.Js}--]>

If so, your store had errors before installation, but they were hidden by previous cache extension. To obtain full error message, perform the following steps:

  1. Go to System -> Configuration -> Mirasvit Extensions -> Full Page Cache and disable it by setting Enabled option to No.
  2. In your store's index.php find and uncomment this line: ini_set('display_errors', 1);
  3. Manually purge ALL cache at System -> Cache Management and external, if you have any.
  4. Open source code of any page of your store, and find real error. Example is shown on screenshot below: errors_before_installation

Copy real error message and contact vendor of appropriate extension.


My store crashes if I activate both Mirasvit Full Page Cache and Lesti_Fpc extensions

Lesti_FPC is not compatible with Mirasvit Full Page Cache extension and in case if both of them are activated Magento's storefront and Admin applications crash with the following error message:

    Method "controllerActionLayoutGenerateBlocksBefore" is not defined in "Mirasvit_Fpc_Model_Observer"

Lesti_FPC has a small subset of capabilities implemented by Mirasvit FPC and in order to fix the store you should completely disable Lesti_Fpc extension by performing the following steps:

  1. Disable Compilation Mode (if enabled)

  2. Remove following files:

    • app/etc/modules/Lesti_Fpc.xml
    • .modman/Lesti_Fpc/app/etc/modules/Lesti_Fpc.xml
  3. Login in to Magento back-end and refresh site cache (if enabled)
Full Page Cache