Getting Started
Welcome to the Full Page Cache documentation. Whether you are new or an advanced user, you can find useful information here.
Next steps:
- How to install extension
- Configure a Full Page Cache
- Support different types of cache
- How to add custom dynamic block (hole punching)
How to install extension
- Login to Magento backend.
-
Go to System > Tools > Compilations.
If Compiler Status is Enabled, then disable the compilation by clicking the button Disable in the upper right corner. After installation of extension, you can enable compilation again.
- Backup your store database and web directory.
- Download extension from your Personal Account.
- Unzip the extension locally.
- Copy contents of the folder step1 to the root directory of Magento store.
- Copy contents of the folder step2 to the root directory of Magento store.
-
Completely clear the site cache. Go to System > Cache Management. Click button Flush Magento Cache.
If you want to clear the cache manually, you need to remove a folder
/var/cache
at the server. - Logout from Magento backend and login again.
- Go to System > Cache Management, select Full Page Cache in list and enable it.
Next steps:
How to upgrade extension
To upgrade extension follow next steps:
- Login to the Magento backend.
- Go to System > Tools > Compilations. If Compiler Status is Enabled, then disable the compilation by clicking the button Disable in the upper right corner. After installation of the extension, you can enable compilation again.
- Backup your store database and web directory.
If you have customizations, please, create a separate backup of app/code/local/Mirasvit before upgrading it to the new version.
- Download a new extension package from your Personal Account.
- Unzip the extension locally.
- Temporary disable extension.
- Copy content of the folder step1 to the root directory of the Magento store.
- Copy content of the folder step2 to the root directory of the Magento store.
- Clear completely the site cache. Go to System > Cache Management. Click the button Flush Magento Cache. If you would like to clear the cache manually, you have to remove a folder /var/cache on the server.
- Logout from the Magento backend and login again.
- If necessary adjust css styles to fit your store's frontend theme.
Extension Disabling
Temporary Disabling
To temporary disable extension please follow the next steps:
- Disable Compilation Mode (if enabled).
- Remove following files:
app/etc/modules/Mirasvit_Fpc.xml
app/etc/modules/Mirasvit_FpcCrawler.xml
- If you have only one extension from Mirasvit installed, remove following file:
app/etc/modules/Mirasvit_MstCore.xml
- Login in to Magento back-end and refresh site cache (if enabled).
Extension Removing
To uninstall extension please follow the next steps:
- Disable Compilation Mode (if enabled).
- Remove following files:
app/etc/modules/Mirasvit_Fpc.xml
app/etc/modules/Mirasvit_FpcCrawler.xml
- If you have only one extension from Mirasvit installed, remove following file:
app/etc/modules/Mirasvit_MstCore.xml
- Login in to Magento back-end and refresh site cache (if enabled).
- Remove following folders:
app/code/local/Mirasvit/Fpc
app/code/local/Mirasvit/FpcCrawler
How to Setup Cron for Magento
Configure a Full Page Cache
Full Page Cache extension has rich set of options, that allows you to tune-up your Cache. It breaks into two large groups, which also have subsections:
- Full Page Cache - defines Cache settings, and located at * Full Page Cache - defines Cache settings, and located at
- Full Page Crawler - enables and configures Crawler, special tool to warn up your cache. These options are located at System > Configuration > Mirasvit Extensions > Full Page Cache Crawler.
Pick a section to know more.
General Settings
Cache Rules
- Max. Allowed Page Depth - determines the number of layered navigation filters, or parameters, that can be applied in order for a page to be cached.
-
Cacheable Actions - list of cacheable actions. Read more:
Basically, the structure of the cacheable action:
[module_name]/[controller_name]_[action_name]
Cacheable Action examples:
- cms/index_index - home page
- cms/page_view - all cms pages (but not for home page)
- catalog/product_view - product view page
- catalog/category_view - category view page/product list page
In most cases, you can see what expression to use via HTML code. For example, to know what expression you should use to make cacheable Home page, you need to inspect body class of your store home page. As we can see,
body class="cms-index-index"
can be added to the cacheable list as: cms/index_index
-
Ignored Pages - list of not eligible for caching pages. Read more:
For example we have a store page: http://www.example.com/apparel/shoes.html To exclude from cache page
apparel/shoes.html
, you need to add this line:/apparel\/shoes.html/
to the Ignored Pages list. To exclude from cache all pages which containapparel
, you need to add a new line:/apparel/
. If you add line/gclid/
to the Ignored List, extension will not cache all pages which containgclid
in the URLs, where?gclid=
- Google Click Identifier. -
User Agent Segmentation - determines the cache by user agent. How to setup User Agent Segmentation:
Go to System > Configuration > Design. The 2nd box down should be Themes, open it and if it is setup like the Magento default your existing theme will be set as the Default value. Click the Add Exception button. It allows to enter a Matched Expression which Magento will compare with the browsers user agent and if it matches, it will display the theme specified in the Value box. You can enter as many expressions as you like, separated by a pipe symbol (|), depending on which devices you want to target. To target the most popular devices such as Android and iPhones, the following code will work: Now you need to target these devices. Go to System > Configuration > Mirasvit Extensions > Full Page Cache and open Cache Rules block. Set Cache group for each segment. Use slashes to specify User Agent: /agent example/. After all changes Flush Magento Cache.
-
Ignored Url Parameters - allows you to use same cache for pages with same base URL, but different GET parameters. Read more:
Store pages often can be referenced from other stores, catalogs and social networks, which can add to URL of that pages certain GET parameters. For example, if you will share
https://store.com/product.html
via email, when customer clicks on it, the actual URL will behttps://store.com/product.html?utm_medium=email
. Parameterutm_medium
is called reference mark and used in automated traffic and marketing analysis.Technically, both of above URLs point to the same page with same information, but cache treats them as different pages (since URL's are different) and creates two cached pages. If you have extensive store structure, it can increase cache size - since each page will be cached multiple times.
Our extension can analyze GET parameters, search for enlisted parameter marks (like
utm_medium
) before cache request, and remove them for requested URL. This makes cache create only one cached page, and use it whenever customer clicks on a link with marks. It will dramatically reduce cache size.If you use this feature, and enable System -> Configuration -> Mirasvit Extensions -> Full Page Cache -> Show Time Stats, you can see ignored parameters for a particular page, as shown below.
Stores also can use GET parameters for dynamically generated pages - such as filtering catalog sections withprice
parameter. If you will include such parameters to Ignored Url Parameters list, it will break store functionality. Here is the list of parameters, which should not be enlisted:price
limit
dir
order
mode
Latest versions of our extensions ignore such parameters, even when they are enlisted, but some of old versions can still allow them.
- Use Mobile Detect - Determines the cache by device type.
Extended setting (for most part of stores should be default)
Option | Description |
---|---|
Clean old cache | Clear old cache (expired cache) by cron. Sometimes if Magento cron job has not enough permissions for this operation, it will flush all cache. If you see such situation, you need to run Magento cron job from user with more permissions or set 'No' for this configuration. |
Update headers for cached pages | If disabled add only FPC cache Id in headers and don't update other headers from cache. For most part of stores should be enabled. |
Update cart method | Update cart method. In most situation should be "Default". If you have any problem with cart set "Whole page" and refresh all cache. |
Add all tags for home page | If enabled will add maximum tags for home page. Sometimes it is need for blocks update. |
Use session for specified block | If disabled ignore in_session parameter in cache.xml file and don't use session for such blocks. |
Use the same cache for all groups | If enabled create the same cache for all customer groups. Can be enabled only if you use the same price for all custome groups. |
Update stock method | In most situation should be "Default". Default - update stock using event "cataloginventory_stock_item_save_commit_after". Default (check stock in frontend) - check stock in frontend. Update during reindex (Cache Level should be Default) - update stock after product save and reindex. |
Delete ignored url params for layered navigation | Removes from Layered Navigation URLs, that should be ignored. For most cases should be No. |
Html pattern | Uses a special pattern for block excluding from caching. Should be Default in most cases. Read more at How to add custom dynamic block |
Add Related Products Tags | Add to caching tags, defines for products. |
Debug
Crawler Settings
Option | Description |
---|---|
Enabled | Enable Mirasvit Crawler. Extension will automatically visit all not cached pages defined at Crawler URLs. Note: If feature disabled, extension will work as before, but without automatically caching not cached pages. |
Number of Threads | Defines the number of parallel requests during this process. Note: A higher number of threads will reduce the amount of time required to cache all pages, however it will also consume more system resources. We recommend 1 to 5 parallel threads. |
Limit of Crawled URLs per Run | Defines maximum number of crawled URLs per one cron (or shell) run |
Schedule | Specifies how often cron must run crawler. Uses Cron format. For example, 0 */3 * * * means every 3 hours. Most useful examples also can be found here. |
Sort Crawler urls by | allows to set sort order for crawled Urls by Popularity or by Custom Order at the Crawler Urls list (System -> Full Page Cache -> Crawler URLs). To see how to set up Custom Order, go to Crawler URLs Page and check Sort by page type and Sort by product attribute settings. |
Limit for crawled urls | If enabled will crawl only a predetermined number of links. Leave empty or set 0 to don't use. |
Crawler for logged user
- Select customer groups for crawl - additional option, that defines customer groups which will be crawled by Mirasvit Crawler with options, defined in this section.
Extended crawler setting (for both crawlers)
Crawler URLs
Each time when visitor visit cacheable page (according to the settings Cacheable Actions, Allowed Pages, Ignored Pages, Max. Allowed Page Depth), extension automatically save page url to file
var/log/fpc.log
( for logged in users var/log/fpclogged.log
).
Every 15 minutes this log is exported into a database, therefore you can see these URLs in the Crawler URLs table (System->Full Page Cache->Crawler URLs). Crawler scans URls from these table, and if Url is not in the cache, he adds them to the cache.If "Add crawled ulrs directly in database" enabled FPC will add urls directly in database.
To enable the Crawler, go to System > Configuration > Full Page Cache and set Enabled at the Crawler Settings list.
Full list of these urls you can find at System > Full Page Cache > Crawler URLs and System > Full Page Cache > Crawler URLs for logged in users, where:
- URL - full url to page
- Cache Id - unique identifier for this page
- Popularity (number of visits) - number of visits (priority for crawler)
-
Sort by page type - sorts URLs list by page type. To use advanced settings for sort by page type, follow these steps:
Go to System > Configuration > Mirasvit Extensions > Full Page Cache, open Crawler Settings list.
At the line Sort Crawler urls by set value Custom Order and you will see a Sort by page type option.
Add from the list Cachable Actions with the highest priority (from top to the bottom). There are 6 types of Cachable Actions are available:cms/index_index
- home pagecms/index_index+
- home page with GET parameters. For example: http://example.com?data=1&data1=2)catalog/product_view
- all product pages. For example: http://www.example.com/accessories/eyewear/aviator-sunglasses.htmlcatalog/product_view+
- all product pages with GET parameters. For example: http://www.example.com/accessories/eyewear/aviator-sunglasses.html?data=4&data4=5)catalog/category_view
- all category pages. For example: http://example.com/accessories/eyewear.htmlcatalog/category_view+
all category pages with GET parameters. For example: http://example.com/accessories/eyewear.html?limit=24
If option Sort by product attribute is also configured, settings at Sort by page type have higher priority.
Unassigned Cacheble actions in the list will be sorted by popularity
-
Sort by product attribute - sorts URLs list by product attributes. To use advanced settings for sort by product attribute, follow these steps:
Go to System > Configuration > Mirasvit Extensions > Full Page Cache, open Crawler Settings list.
At the line Sort Crawler urls by set value Custom Order and you will see a Sort by product attribute option. Select from the list Attribute and set appropriate Value for the sort order. You can set a few values separated by comma. If field Value leave empty, then it will check only attribute existence in the product.
At the Crawler URLs list, you will see product attribute values like 1, 2, 3. Each number response for the number of the Sort by product attribute position.
If option Sort by page type is also configured, settings at Sort by page type have higher priority.
~! To make changes work, you need to remove all URLs at System > Full Page Cache > Crawler URLs and totally flush Magento cache.
-
Customer group - Customer group for current url (only for "Crawler URLs for logged in users").
-
Store id - Store id for current url.
-
Currency - Currency for current url.
-
Cache Status - indicates the current cache status for this page
- Pending - page not available in cache yet
- In Cache - page already in cache
Depending on crawler cron expression, crawler visits all not cached URLs and fill cache for these URLs.
How to add custom dynamic block
- Structure of custom.xml file
- I have an error after block excluding. How can I fix it?
- Example of adding custom dynamic block
- Example of adding Static Block as dynamic block (Variant 1, Variant 2, Variant 3)
- Example of adding block as dynamic block if block added in template
- Example how to create a new block from particular code
- Example how to disable standard block from cache.xml
- Example of adding amfinder block as dynamic block
- How check if block is excluded?
- Why can't I exclude price block?
After first rendering of page, extension check allow/disallow rules, cacheable actions and save this page (with all blocks) to cache. Then extension will return cached page without new rendering.
For update certain blocks extension provided an ability to define dynamic blocks.
Dynamic block - cached block with information which updated based on predefined conditions.
If text inside parameter depends
is empty (<depends></depends>
) block will be excluded from cache.
Native dynamic blocks:
page/html_header
checkout/cart_sidebar
page/html_wecome
reports/product_viewed
catalog/product_compare_sidebar
wishlist/customer_sidebar
page/template_links
page/html_notices
page/html_cookieNotice
cookienotice/notice
(OptimiseWeb)
All dynamic blocks defined in files:
app/code/local/Mirasvit/Fpc/etc/cache.xml
- contains native dynamic blocksapp/code/local/Mirasvit/Fpc/etc/custom.xml
- contains custom (for current store) dynamic blocksapp/code/local/Mirasvit/Fpc/etc/cachelogged.xml
- contains custom (for logged in users) dynamic blocks
Structure of custom.xml file
<?xml version="1.0" encoding="UTF-8"?>
<config>
<containers>
<zblock>
<block>zblocks/block</block>
<container>Mirasvit_Fpc_Model_Container_Base</container>
<depends></depends>
<in_app>0</in_app>
</zblock>
</containers>
</config>
where:
block
- type of the block-
container
- the model, which implements logic of dynamic block cacheIn most cases, you can use
Mirasvit_Fpc_Model_Container_Base
-
depends
- the set of conditions for update block cache (comma seperator)customer
- current customercustomer_group
- current customer groupcart
- shopping cartcompare
- compare listwishlist
- wishlistproduct
- current productcategory
- current categorystore
- current storecurrency
- current currencylocale
- current localerotator
- rotate block (save 5 different variants of the block and then return its random from cache)- empty value - constantly update block (always fresh)
-
in_app
- logic for block update0
- allow block update without rendering whole page1
- update block only with rendering whole page
in_register
- Optionally you can use in register in_register (<in_register>current_category,current_product,product</in_register>
).current_category
- If excluded block use Mage::registry('current_category')current_product
- If excluded block use Mage::registry('current_product')product
- If excluded block use Mage::registry('product').
core/template
, core/text_list
or other block which exist with different names use also parameter name
to show which block should be excluded.
<?xml version="1.0" encoding="UTF-8"?>
<config>
<containers>
<zblock>
<block>zblocks/block</block>
<name>blockname</name>
<container>Mirasvit_Fpc_Model_Container_Base</container>
<depends></depends>
<in_app>0</in_app>
</zblock>
</containers>
</config>
I have an error after block excluding. How can I fix it?
If you have excluded blocks that use Mage::registry('current_category'), Mage::registry('current_product') or Mage::registry('product') you can get an error like this "Fatal error: Uncaught Error: Call to a member function getMetaTitle() on null in /app/code/core/Mage/Catalog/Block/Product/View.php:56" or similar. To fix the error you'll need to add in_register
parameter.
current_category
- if excluded block use Mage::registry('current_category')
<?xml version="1.0" encoding="UTF-8"?> <config> <containers> <zblock> <block>zblocks/block</block> <name>blockname</name> <container>Mirasvit_Fpc_Model_Container_Base</container> <depends></depends> <in_register>current_category</in_register> <in_app>0</in_app> </zblock> </containers> </config>
current_product
- if excluded block use Mage::registry('current_product')
<?xml version="1.0" encoding="UTF-8"?> <config> <containers> <zblock> <block>zblocks/block</block> <name>blockname</name> <container>Mirasvit_Fpc_Model_Container_Base</container> <depends></depends> <in_register>current_product</in_register> <in_app>0</in_app> </zblock> </containers> </config>
product
- if excluded block use Mage::registry('product')
<?xml version="1.0" encoding="UTF-8"?> <config> <containers> <zblock> <block>zblocks/block</block> <name>blockname</name> <container>Mirasvit_Fpc_Model_Container_Base</container> <depends></depends> <in_register>product</in_register> <in_app>0</in_app> </zblock> </containers> </config>
If you don't know which parameter add in
in_register
you can use<in_register>current_category,current_product,product</in_register>
.
Example of adding custom dynamic block
If the block is not declared at layout files, you need To create a new block.
-
Go to System > Configuration > Advanced > Developer and open Debug block.
Select the required store view.
Set Yes at the option Template Path Hints to show all template paths on your frontend. - Select a page template.
For example, we need to exclude the menu block from fpc cache.
To exclude this block, go to your frontend store page and check the template path near required block:
The current example path to the menu block: frontend/rwd/default/template/page/html/topmenu.phtml
-
Using global search find the layout (in your theme) where the template is applied.
Copy the phrase which starts after /template/ path:page/html/topmenu.phtml
.
Search pathpage/html/topmenu.phtml
to find the file on your server, where the template is set up.
For this purpose, you can use sublime-text. Search results should be:Found File: /magento_root/app/design/frontend/base/default/layout/page.xml
---------------------------------------------------------------------------------------------- block type="core/text_list" name="top.menu" as="topMenu" translate="label"> <label>Navigation Bar</label> <block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml"/> </block> ----------------------------------------------------------------------------------------------
From the found file we need to get the block details:
<block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml"/>
-
Add current block details to custom.xml file.
Create a new file custom.xml at /magento_root/app/code/local/Mirasvit/Fpc/etc/.
Add next content to the created file:<?xml version="1.0" encoding="UTF-8"?> <config> <containers> <page_html_topmenu> <block>page/html_topmenu</block> <name>catalog.topnav</name> <container>Mirasvit_Fpc_Model_Container_Base</container> <depends></depends> <in_app>false</in_app> </page_html_topmenu> </containers> </config>
If the file custom.xml already exists, you need to add new block details between
<containers>
and</containers>
tags. - Refresh cache in "Cache Storage Management".
- Check if block is excluded.
Example of adding Static Block as dynamic block (from version 1.0.14)
Variant 1
1.) Add unique tags to the begin and to the end of static block
2.) You can exclude the block from FPC cache if add the following code to the file /app/code/local/Mirasvit/Fpc/etc/custom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<containers>
<home_decor_block_exclude>
<block>cms/block</block>
<container>Mirasvit_Fpc_Model_Container_Cmsblock</container>
<block_id>home-decor</block_id>
<replacer_tag_begin><![CDATA[<!-- home_decor_block_exclude_begin -->]]></replacer_tag_begin>
<replacer_tag_end><![CDATA[<!-- home_decor_block_exclude_end -->]]></replacer_tag_end>
<depends></depends>
</home_decor_block_exclude>
</containers>
</config>
where 'block_id' it is Static Block Identifier.
3.) Refresh cache in "Cache Storage Management".
4.) Check if block is excluded.
If you need exclude block like this {{block type="core/temoplate" name="block" template="page/html/myblock.phtml"}}
1.) Add unique tags to the begin and to the end of static block
2.) You can exclude the block from FPC cache if add the following code to the file /app/code/local/Mirasvit/Fpc/etc/custom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<containers>
<core_template_block>
<block>core/template</block>
<container>Mirasvit_Fpc_Model_Container_Phtmlblock</container>
<template>page/html/myblock.phtml</template>
<replacer_tag_begin><![CDATA[<!-- block_exclude_begin -->]]></replacer_tag_begin>
<replacer_tag_end><![CDATA[<!-- block_exclude_end -->]]></replacer_tag_end>
<depends></depends>
</core_template_block>
</containers>
</config>
3.) Refresh cache in "Cache Storage Management".
4.) Check if block is excluded.
Variant 3 (from version 1.0.75)
If you need exclude block like this {{block type="catalog/product_list" name="product_list_t" category_id="5" column_count="3" count="6" limit="4" mode="grid" toolbar_block_name="product_list_toolbar" template="catalog/product/list.phtml"}}
1.) Add unique tags to the begin and to the end of static block
2.) You can exclude the block from FPC cache if add the following code to the file /app/code/local/Mirasvit/Fpc/etc/custom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<containers>
<catalog_product_list>
<block>catalog/product_list</block>
<name>product_list_t</name>
<container>Mirasvit_Fpc_Model_Container_Phtmlblock</container>
<template>catalog/product/list.phtml</template>
<replacer_tag_begin><![CDATA[<!-- block_exclude_product_list_t_begin -->]]></replacer_tag_begin>
<replacer_tag_end><![CDATA[<!-- block_exclude_product_list_t_end -->]]></replacer_tag_end>
<additional_data>
<category_id>5</category_id>
<column_count>3</column_count>
<count>6</count>
<limit>4</limit>
<mode>grid</mode>
<toolbar_block_name>product_list_toolbar</toolbar_block_name>
</additional_data>
<depends></depends>
</catalog_product_list>
</containers>
</config>
3.) Refresh cache in "Cache Storage Management".
4.) Check if block is excluded.
Example of adding block as dynamic block if block added in template (from version 1.0.11)
For example, we have following block
<?php echo Mage::app()->getLayout()->createBlock('core/template')->setTemplate('page/html/infoblock.phtml')->toHtml(); ?>
in template.
1.) Add unique tags to the begin and to the end of the block
2.) You can exclude the block from FPC cache if add the following code to the file /app/code/local/Mirasvit/Fpc/etc/custom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<containers>
<core_template_infoblock>
<block>core/template</block>
<container>Mirasvit_Fpc_Model_Container_Phtmlblock</container>
<template>page/html/infoblock.phtml</template>
<replacer_tag_begin><![CDATA[<!-- infoblock_exclude_begin -->]]></replacer_tag_begin>
<replacer_tag_end><![CDATA[<!-- infoblock_exclude_end -->]]></replacer_tag_end>
<depends></depends>
</core_template_infoblock>
</containers>
</config>
3.) Refresh cache in "Cache Storage Management".
4.) Check if block is excluded.
How to create a new block from particular code
Follow these steps to create a new block for the specific code.
-
For example, you want to exclude block
<div class="header-static-block">
from the file/app/design/frontend/[your_package]/[your_theme]/template/page/html/header.phtml
:
-
1) At the same folder you need to create a new file, for example ipdetail.phtml:
/app/design/frontend/[your_package]/[your_theme]/template/page/html/ipdetail.phtml
,
where you need to copy this particular code from header.phtml file: -
2) Create copy of the original header.phtml file, for example: header.phtml_ORIG.
-
3) Delete or comment out the the copied code (block header-static-block) at the current header.phtml file:
-
4) Add this code to the file
/app/design/frontend/[your_package]/[your_theme]/layout/page.xml
inside of header block:
<block type="core/text_list" name="ip_detail_text_list_block" as="ip_detail_text_list_block" translate="label">
<label>ip detail</label>
</block>
where:
name="ip_detail_text_list_block"
- any reference name for this block,
as="ip_detail_text_list_block"
- alias for this block (the same as name).
If you don't have page.xml file at the folder /app/design/frontend/[your_package]/[your_theme]/layout/
, you need to copy it from
/app/design/frontend/base/default/layout
.
- 5) Add this code to the file
/app/design/frontend/[your_package]/[your_theme]/layout/local.xml
:
<default>
<reference name="ip_detail_text_list_block">
<block type="core/template" name="ip_detail_block" template="page/html/ipdetail.phtml" />
</reference>
</default>
where:
reference name="ip_detail_text_list_block"
- reference block name, which we declared previously in the page.xml file,
name="ip_detail_block"
- any name you want for this block,
template="page/html/ipdetail.phtml"
- path to the new created file ipdetail.phtml. Sets only path after /template/ folder.
If you don't have local.xml file at this layout folder, you need to create this file and add these lines:
<?xml version="1.0" encoding="UTF-8" ?>
<layout>
<default>
<reference name="ip_detail_text_list_block">
<block type="core/template" name="ip_detail_block" template="page/html/ipdetail.phtml" />
</reference>
</default>
</layout>
-
6) Add next lines to the file header.phtml:
<?php echo $this->getChildHtml('ip_detail_text_list_block') ?>
After cache is flushed, you will see this block in frontend.
Finally, you can exclude the block from FPC cache if add the following code to the file /app/code/local/Mirasvit/Fpc/etc/custom.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<containers>
<core_template_ip_detail_block>
<block>core/template</block>
<name>ip_detail_block</name>
<container>Mirasvit_Fpc_Model_Container_Base</container>
<depends></depends>
<in_app>false</in_app>
</core_template_ip_detail_block>
</containers>
</config>
How to disable standard block from cache.xml
For example you need to stop exluding standard block page/html_welcome which you can find in file /app/code/local/Mirasvit/Fpc/etc/cache.xml
<welcome_message>
<block>page/html_welcome</block>
<container>Mirasvit_Fpc_Model_Container_Welcome</container>
<depends>store,logged_in,customer,customer_group</depends>
<in_session>true</in_session>
<in_app>false</in_app>
</welcome_message>
add the following code in file /app/code/local/Mirasvit/Fpc/etc/custom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<containers>
<welcome_message>
<disabled>true</disabled>
</welcome_message>
</containers>
</config
and refresh cache to apply results to the fronend.
Example of adding amfinder block as dynamic block
If block added as static block (CMS->Static Blocks):
-
Go to System > Configuration > Advanced > Developer and open "Debug" tab.
Select needed store view.
Set "Template Path Hints" to "Yes" to see all template paths on your frontend. -
In frontend you will see something like this:
In the example above template path is amfinder/horizontal.phtml -
Add unique tags at the beginning and to the end of static block
- To exclude block from FPC cache you'll need to add following code to the file /app/code/local/Mirasvit/Fpc/etc/custom.xml:
<?xml version="1.0" encoding="UTF-8"?> <config> <containers> <amfinder_form_3> <block>amfinder/form</block> <container>Mirasvit_Fpc_Model_Container_PhtmlblockAm</container> <template>amfinder/horizontal.phtml</template> <set_id>3</set_id> <replacer_tag_begin><![CDATA[<!-- amfinder_form_3_begin -->]]></replacer_tag_begin> <replacer_tag_end><![CDATA[<!-- amfinder_form_3_end -->]]></replacer_tag_end> <depends></depends> </amfinder_form_3> </containers> </config>
- Refresh cache in "Cache Storage Management".
- Check if block is excluded.
How check if block is excluded?
Enable following configuration:
System->Full Page Cache->Settings->Debug->Enable Debug Hints = Yes
System->Full Page Cache->Settings->Debug->Show debug data and logs 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)
In frontend you will see "Cache Miss" for excluded block.
Why can't I exclude price block?
You can't exclude price if it is not added as block for product page. If for product page price added as block (you have custom theme) you can exclude it this way.
You can't exclude price for product list, because FPC doesn't know which product should be used.
FPC updates page price if you change prices in admin panel. So in most situations you don't need to exclude price.
If you use specific accounting software you can use this way.
If for some reason you are sure that price need to be exluded you can exclude only parent blocks for price using file custom.xml or cachelogged.xml.
For default magento it will be catalog/product_view and catalog/product_list:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<containers>
<catalog_product_view>
<block>catalog/product_view</block>
<name>product.info</name>
<container>Mirasvit_Fpc_Model_Container_Base</container>
<depends></depends>
<in_register>current_category,current_product,product</in_register>
<in_app>false</in_app>
</catalog_product_view>
<catalog_product_list>
<block>catalog/product_list</block>
<name>product_list</name>
<container>Mirasvit_Fpc_Model_Container_Base</container>
<depends></depends>
<in_register>current_category,current_product</in_register>
<in_app>false</in_app>
</catalog_product_list>
</containers>
</config>
If you excluded price this way you can set "Use the same cache for all groups = Yes" in System > Full Page Cache > Settings. FPC will start using the same cache for all customer groups.
Advanced Cache Configuration
Additionally you can configure cache in file [mage_dir]/app/etc/fpc.xml
or [mage_dir]/app/etc/local.xml
<?xml version="1.0"?>
<config>
<global>
<fpc>
<backend_options>
<cache_dir>cache_fpc</cache_dir>
<hashed_directory_level>2</hashed_directory_level>
</backend_options>
</fpc>
</global>
</config>
As a result, cache files will be located at [mage_dir]/var/cache_fpc
Reports
Go to System > Cache Management
Extension generates a data chart based on the requests to the store pages. It allows to track:
- average response time of the store pages.
- cache size and number of cache files.
- amount of the generated and requested pages from the cache.
- compare response time of the new generated pages and the pages from the cache.
On a cache Miss, the cache control mechanism must pass request to magento, generate the page and place it in the cache.
On the chart you can check percentage ratio between Hits and Miss pages for a certain period, where:
- Hits % - percentage of the requests to the pages that are found in the cache.
- Miss % - percentage of the requests to the pages, which are not in the cache and have to be generated.
Shell commands
Full Page Cache features two special CLI commands, that should be run via command line:
- CLI Site Crawler - runs site crawler from CLI.
- CLI FPC URL Generator - generates crawler URL's from CLI (from version 1.0.78).
Both of these scripts are located at <magento_root>/shell/
subdirectory.
CLI Site Crawler
Usage: php fpc.php [options]
Option | Description |
---|---|
--crawl |
Run crawler for all allowed stores |
--crawl_logged |
Run crawler for all allowed stores (logged in users) |
--status |
Show crawler status |
--status_logged |
Show crawler for logged in users status |
--update_log |
Update log data (import urls to crawler, update chart data). Read more |
--update_log_logged |
Update log data (import urls to crawler for logged in users) |
--clear_by_limits |
Clear all cache if limits were reached. Read more |
Some of these options perform special tasks:
-
php fpc.php --update_log
This command import Urls to crawler - after each visit page by customer, all visited Urls will be placed to /var/fpc.log. All these Urls will be imported to table:
[db_table_prefix]m_fpc_crawler_url
, where[db_table_prefix]
- your database table prefix. After import, these Urls will be shown at Crawler URLs table: System > Full Page Cache > Crawler`s URLs. This command also updates data сhart. -
php fpc.php --clear_by_limits
This command clear all cache if limits were reached. To set cache limits, go to System > Configuration > Full Page Cache and set values for Max. Cache Size (Mb) and Max. Number of Cache Files.
If you use Redis or Memcache this option will not work, because Redis and Memcache clear cache automatically.
CLI FPC URL Generator
Usage: php -f fpc_generate.php [options]
Option | Description |
---|---|
--generate |
Generate crawler urls without adding in cache (use data from admin panel) |
--generate_and_crawl_both |
Generate and add to the cache (for generation use data from admin panel) |
--crawl_both |
Crawl all generated urls from crawler table (can take a lot of time) |
--crawl_logged_in |
Crawl logged in generated urls from crawler table (can take a lot of time) |
--crawl_not_logged_in |
Crawl not logged in generated urls from crawler table (can take a lof of time) |
--store_id |
Perform action only for store with specified ID. Used as additional argument for --crawl_both, --crawl_logged_in, --crawl_not_logged_in options. |
php fpc_generate.php --crawl_not_logged_in --store_id 2
Support different types of cache
Full Page Cache will work correctly with Redis, Memcache, Apc, OPcache, File Cache, Database, Varnish automatically without any additional configuration.
We highly recommend to use REDIS as the best choice to work with FPC. REDIS keep all cache in RAM, so you can keep in RAM a large count of cache files without slow down your store.
REDIS allows to set a high values for the Cache Lifetime (for example: 604800 sec [7 days]) and store the cache for a long time. If you use other types of cache, high Cache Lifetime can significantly slow down the shop.
Varnish
Varnish has the same functions as FPC. If Varnish works correctly, then FPC will work correctly with Varnish too.
Configure magento to work with REDIS
~! REDIS must be installed on the server before configuring
1) Install Cm_Cache_Backend_Redis Magento Extension
-
Installation required if you are using Magento CE 1.7.0.2 and older, as Magento 1.8.0.0 it comes pre installed:
wget -O Cm_Cache_Backend_Redis.tar.gz https://github.com/colinmollenhour/Cm_Cache_Backend_Redis/tarball/master
tar xzf Cm_Cache_Backend_Redis.tar.gz
cd colinmollenhour-Cm_Cache_Backend_Redis-*/
cp -r Cm /path/to/magento/app/code/local/
cp -r lib/Credis /path/to/magento/lib/
cat > /path/to/magento/app/etc/modules/Cm_Cache.xml <<eof <?xml version="1.0" encoding="UTF-8"?> <config> <modules> <Cm_Cache> <active>true</active> <codePool>local</codePool> </Cm_Cache> </modules> </config> eof
2) Install Credis Library
-
Installation is not required if you are using Magento 1.8.0.0 or higher, as its already included in the base install:
wget -O credis.tar.gz https://github.com/colinmollenhour/credis/tarball/master
tar xzf credis.tar.gz
cd colinmollenhour-credis-*/
cp -r ./* /path/to/magento/lib/Credis/
cd /path/to/magento/
chown -R username. lib/Credis/
chown -R username. app/code/local/Cm/
chown -R username. app/etc/modules/Cm_Cache.xml
3) How to configure REDIS
-
To configure magento to work with REDIS, you need add the following lines to your configuration file (app/etc/local.xml) after
</resources>
tag:<cache> <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.
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-redis
http://briansnelson.com/Install_Redis_Caching_for_Magento
http://www.magentocommerce.com/knowledge-base/entry/redis-magento-ce-ee
http://redis.io/download
Configure magento to work with MEMCACHE
~! MEMCACHE must be installed on the server before configuring You can check if you use MEMCACHE in phpinfo:
To configure magento to work with MEMCACHE you need to add the following lines to your configuration file ( app/etc/local.xml ) after </resources>
tag:
-
MEMCACHE and file system
<cache> <backend>memcached</backend> <memcache> <servers> <server> <host><![CDATA[127.0.0.1]]></host> <port><![CDATA[11211]]></port> <persistent><![CDATA[1]]></persistent> <weight><![CDATA[]]></weight> <timeout><![CDATA[]]></timeout> <retry_interval><![CDATA[]]></retry_interval> <status><![CDATA[]]></status> </server> </servers> <compression><![CDATA[0]]></compression> <cache_dir><![CDATA[]]></cache_dir> <hashed_directory_level><![CDATA[]]></hashed_directory_level> <hashed_directory_perm><![CDATA[]]></hashed_directory_perm> <file_name_prefix><![CDATA[]]></file_name_prefix> </memcache> </cache>
~! Please note that after installation sets default port number, but if its different, you should set correct port number of your hosting account.
-
MEMCACHE and database
<cache> <backend>memcached</backend> <slow_backend>database</slow_backend> <memcache> <servers> <server> <host><![CDATA[127.0.0.1]]></host> <port><![CDATA[11211]]></port> <persistent><![CDATA[1]]></persistent> <weight><![CDATA[]]></weight> <timeout><![CDATA[]]></timeout> <retry_interval><![CDATA[]]></retry_interval> <status><![CDATA[]]></status> </server> </servers> <compression><![CDATA[0]]></compression> <cache_dir><![CDATA[]]></cache_dir> <hashed_directory_level><![CDATA[]]></hashed_directory_level> <hashed_directory_perm><![CDATA[]]></hashed_directory_perm> <file_name_prefix><![CDATA[]]></file_name_prefix> </memcache> </cache>
~! Please note that after installation sets default port number, but if its different, you should set correct port number of your hosting account.
Configure magento to work with MEMCACHED
~! MEMCACHED must be installed on the server before configuring.
You can check if you use MEMCACHED in Cache Storage Management page.
To configure magento to work with MEMCACHED you need to add the following lines to your configuration file ( app/etc/local.xml ) after </resources>
tag:
-
MEMCACHED and file system
<cache> <backend>memcached</backend> <memcached> <servers> <server> <host><![CDATA[127.0.0.1]]></host> <port><![CDATA[11211]]></port> <persistent><![CDATA[1]]></persistent> <weight><![CDATA[]]></weight> <timeout><![CDATA[]]></timeout> <retry_interval><![CDATA[]]></retry_interval> <status><![CDATA[]]></status> </server> </servers> <compression><![CDATA[0]]></compression> <cache_dir><![CDATA[]]></cache_dir> <hashed_directory_level><![CDATA[]]></hashed_directory_level> <hashed_directory_perm><![CDATA[]]></hashed_directory_perm> <file_name_prefix><![CDATA[]]></file_name_prefix> </memcached> </cache>
~! Please note that after installation sets default port number, but if its different, you should set correct port number of your hosting account.
-
MEMCACHED and database
<cache> <backend>memcached</backend> <slow_backend>database</slow_backend> <memcached> <servers> <server> <host><![CDATA[127.0.0.1]]></host> <port><![CDATA[11211]]></port> <persistent><![CDATA[1]]></persistent> <weight><![CDATA[]]></weight> <timeout><![CDATA[]]></timeout> <retry_interval><![CDATA[]]></retry_interval> <status><![CDATA[]]></status> </server> </servers> <compression><![CDATA[0]]></compression> <cache_dir><![CDATA[]]></cache_dir> <hashed_directory_level><![CDATA[]]></hashed_directory_level> <hashed_directory_perm><![CDATA[]]></hashed_directory_perm> <file_name_prefix><![CDATA[]]></file_name_prefix> </memcached> </cache>
~! Please note that after installation sets default port number, but if its different, you should set correct port number of your hosting account.
https://www.siteground.com/tutorials/supercacher/memcached/
https://www.siteground.com/tutorials/supercacher/magento_memcached.htm
https://www.properhost.com/members/knowledgebase/28/How-to-enable-Memcached-in-Magento.html
Configure magento to work with database (instead of file system)
To configure magento to work with database (instead of file system) you need to add the following lines to your configuration file ( app/etc/local.xml ) after </resources>
tag:
-
Database
<cache> <backend>database</backend> </cache>
FPC crontab jobs
- fpc_cache_clean_old - job responsible for leaning up(deleting) expired cache entries. Also if you are using file system for cache FPC will flush cache depending from configurations
System > Full Page Cache > Settings > "Max. Cache Size (Mb)"
andSystem > Full Page Cache > Settings > "Max. Number of Cache Files"
. - fpc_flush_cache - cron job, responsible for automatically flushing Full Page cache by defined schedule. Option is located in
System > Full Page Cache > Settings > "Flush Cache Expr"
and is empty(disabled) by default. - fpc_log_import, fpc_log_import_logged - by default crawled URLs are being aggregated in
/var/log/fpc.log
//var/log/fpclogged.log
file and than are imported into the database via cron job. You may disable this procedure by writing URLs directly into the database by setting "Add crawled ulrs directly in database" option inSystem > Full Page Cache > Crawler Settings
/System > Full Page Cache > Crawler for logged user
to "Yes". - fpc_log_aggregate - job which transfers log data in table m_fpc_log_aggregated in compact form.
- fpc_crawler, fpc_crawlerlogged - job, responsible for extension automatically visiting all not cached pages defined at
Crawler URLs
/Crawler URLs for logged in users
. Related configurations are located inSystem > Full Page Cache > Crawler Settings
. There you can change crawler schedule or disable it, if needed. If feature disabled, extension will work as before, but without automatically caching not cached pages.
Troubleshooting
- How to check if the FPC extension is fully working?
- How can I create optimal FPC settings for maximal result?
- What actions should be defined if we need to cache the checkout steps?
- Does the Cloudfront CDN module works fine with FPC extension?
- Extension does not cache some block(s) correctly
- How can I add to cache AW Blog?
- How can I add to cache 'customer', 'wishlist', 'checkout', 'sales' pages?
- How can I add to cache 'review', 'tag' or any other page?
- How can I configure FPC for separated magento installation (admin panel use one server and frontend use other server)?
- I use 'redis-cli ping' and get an error "(error) NOAUTH Authentication required". How can I fix it?
- 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
- GoMage Procart compatibility ( from version 1.0.42 )
- Is there any way to flush products by ID as we update prices from our accounting software?
- I have strange frontend errors {magicshop/ajaxcart_top.Js} after FPC Installation
- My store crashes if I activate both My store crashes if I activate both Mirasvit Full Page Cache and Lesti_Fpc extensions
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?
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:
- Go to System -> Configuration -> Mirasvit Extensions -> Full Page Cache and disable it by setting Enabled option to No.
- In your store's
index.php
find and uncomment this line:ini_set('display_errors', 1);
- Manually purge ALL cache at System -> Cache Management and external, if you have any.
- Open source code of any page of your store, and find real error. Example is shown on screenshot below:
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:
-
Disable Compilation Mode (if enabled)
-
Remove following files:
app/etc/modules/Lesti_Fpc.xml
.modman/Lesti_Fpc/app/etc/modules/Lesti_Fpc.xml
- Login in to Magento back-end and refresh site cache (if enabled)
Change Log
1.0.87
(2018-08-28)
Fixed
- Fixed error in log when adding category tags after reindex
- Add category URL suffix to category URL
- Fixed cache flushing after reindex (if AsyncIndex installed)
- Fixed Update Attributes if Mirasvit_AsyncCache installed
1.0.86
(2018-06-11)
Improvements
- Additional dependence
1.0.85
(2018-05-25)
Fixed
- Fixed tags for home page if "Cache Level = Don't use tags"
1.0.84
(2018-05-24)
Improvements
- Crawl Mobile URLs
1.0.83
(2018-05-07)
Fixed
- Fixed hole punch (for some stores)
1.0.82
(2018-04-26)
Fixed
- Ability exclude block with data from report_event table
- Ability use mobile cache for mobile and tablet devices
1.0.81
(2018-04-06)
Fixed
- Delete ability use the same cache for all stores
1.0.80
(2018-04-02)
Improvements
- Ability use the same cache for all stores (if you are using the same price and other data)
1.0.79
(2018-03-29)
Fixed
- Fixed "Warning: implode(): Invalid arguments passed in .../app/code/local/Mirasvit/FpcCrawler/Model/Config.php on line 54"
1.0.78
(2018-03-27)
Improvements
- Ability generate and crawl urls
1.0.77
(2018-03-27)
Fixed
- Fix documentation links
- Fix crawling for multistore
Improvements
- Ability crawl by store from ssh
1.0.76
(2018-03-16)
Improvements
- Minor improvements
1.0.75
(2018-03-06)
Fixed
- Fixed redirects for Ignored Url Parameters if page have code "window.history.replaceState"
- Fixed an issue with disabled Mage_Bundle module
- Fixed an error "PHP Fatal error: Call to a member function getTemplate() on a non-object in .../app/code/community/WP/SmartColumns/Block/Toolbar.php on line 33" when extension WP_SmartColumns is installed and block 'catalog_product_list' is excluded
Improvements
- Compatibility with SUPEE-10570
- Ability add custom tags for hole punching
1.0.74
(2018-01-11)
Fixed
- Fixed incorrect url log (for some stores)
Improvements
- Show info about ignored url parameters
- Ability exclude reports/product_viewed if block added in template
- Add related products tags
Documentation
- Documentation update
1.0.73
(2018-01-05)
Fixed
- Fixed Warning: array_merge(): Argument #1 is not an array in .../app/code/local/Mirasvit/Fpc/Helper/Processor/Stock.php on line 105
Improvements
- Pimgento_Product compatibility
1.0.72
(2017-12-22)
Fixed
Fixed an issue with error in AOE_Scheduler (for some stores). If installed AOE_Scheduler extension and we get following error: TRIGGER: shutdown function Last error: Backlog: exception 'Exception' in .../app/code/community/Aoe/Scheduler/Helper/GracefulDead.php:57 Stack trace: #0 [internal function]: Aoe_Scheduler_Helper_GracefulDead::beforeDyingShutdown() #1 {main}
1.0.71
(2017-12-11)
Improvements
- Optimal Configuration improvement
Fixed
- Fixed bundle product page update if child product was changed
1.0.70
(2017-12-04)
Fixed
- Fixed update cache for cms pages
- Fixed incorrect action info in toolbar
1.0.69
(2017-11-28)
Fixed
- Correct store switcher (for some stores)
1.0.68
(2017-11-27)
Fixed
- Correct store switcher (for some stores)
1.0.67
(2017-11-24)
Fixed
- Fixed long product load time because of reports block (for some stores)
1.0.66
(2017-11-24)
Fixed
- Correct store switcher (for some stores)
1.0.65
(2017-11-22)
Improvements
- Promotional Offers compatibility
1.0.64
(2017-11-17)
Fixed
- Fixed validator error
1.0.63
(2017-10-20)
Fixed
- Ability to exclude more than one amfinder block
1.0.62
(2017-09-26)
Improvements
- HTML patterns switcher
Fixed
- Fixed an issue with message if product added to cart (for some themes)
1.0.61
(2017-09-21)
Improvements
- Debug tools improvement
1.0.60
(2017-09-20)
Fixed
- Update cache after Flush Catalog Images Cache flushed
1.0.59
(2017-09-20)
Improvements
- Debug tools improvement
1.0.58
(2017-08-29)
Fixed
- Fixed incorrect stock update if Xtento StockImport extension installed
- AsyncIndex compatibility
1.0.57
(2017-08-23)
Fixed
- Fixed update welcome message
Documentation
- Documentation update
1.0.56
(2017-08-15)
Fixed
- Fixed issue with incorrect admin area detection (for some stores)
1.0.55
(2017-07-27)
Improvements
- Delete ignored url params for layered navigation
- Validator improvement
- Compatibility with Extendware_EWImageOpt
Fixed
- Fixed error if standard block not exist
- Fix Apply Rules flush cache issue
1.0.54
(2017-06-23)
Fixed
- Fixed incorrect tags for home page
- Fixed incorrect translation for crawled urls
1.0.53
(2017-06-13)
Improvements
- Validator improvement
Fixed
- Fix notice
1.0.52
(2017-06-01)
Fixed
- Fixed add redirected page in cache
- Fixed notice if Mirasvit_AsyncIndex installed
1.0.51
(2017-05-17)
Improvements
- Xtento_StockImport compatibility
1.0.50
(2017-05-10)
Fixed
- Fix tags for grouped products
- Fixed nginx error (magento ee)
1.0.49
(2017-05-05)
Improvements
- Ability change stock update method
- Crawler errors warning
- Add products with visibility "Search" if push "Generate crawler urls" button
Fixed
- Ability exclude more than one phtml block for page
Documentation
- Documentation update
1.0.48
(2017-04-26)
Fixed
- Fixed crawler log
Documentation
- Documentation update
1.0.47
(2017-04-25)
Fixed
- Fixed an error with Flush Full Page Cache
1.0.46
(2017-04-24)
Improvements
- Validator improvement
Fixed
- Fixed an error when Flush Cache Log enabled
- Fixed an error with Oro_Catalogoro_Addtocart block excluding
- Fixed incorrect max size info
- Fixed error if Shopshark_Sharkskin extension enabled
1.0.45
(2017-04-19)
Improvements
- Improved optimal configuration
Fixed
- Fixed error when get cache path info (magento 1.8)
Documentation
- Documentation update
1.0.44
(2017-04-18)
Features
- Ability flush cache for Cachable Actions
- Ability ignore pages for crawler
Improvements
- Ability use the same cache for all customer groups
- Log for cache flushing
- Improve optimal configuration
- Ability disable use session for specified blocks
- If reached max cache limit clear only FPC cache
- Tables indexes
- Filesystem cache always in spesific folder
Fixed
- Workaround for Magento bug within 1.9.3.x
Documentation
- Documentation update
1.0.43
(2017-04-18)
Features
- Ability flush cache for Cachable Actions
- Ability ignore pages for crawler
Improvements
- Ability use the same cache for all customer groups
- Log for cache flushing
- Improve optimal configuration
- Ability disable use session for specified blocks
- If reached max cache limit clear only FPC cache
- Tables indexes
- Filesystem cache always in spesific folder
Fixed
- Workaround for Magento bug within 1.9.3.x
Documentation
- Documentation update
1.0.43
(2017-04-14)
Improvements
- Compatibility with PeacockCarter_Breadcrumbs
Fixed
- Fixed an error with incorrect tag for logged in customer
1.0.42
(2017-04-12)
Improvements
- Ability to disable standard block from cache.xml
- Validator improvement
- Add all tags for home page
- GoMage Procart compatibility
Fixed
- Fixed issue with not all tags for logged in users
- Fixed incorrect info if expired cache flushing disabled
- Fixed error when flush cache in frontend (for some stores)
- Fixed an error with SimpleXMLElement
- Fixed generate crawler urls action for disabled crawler
- Fixed store page update if cache in custom folder
1.0.41
(2017-04-04)
Fixed
- Fixed an error with xml preparing
1.0.40
(2017-04-03)
Improvements
- Ability switch the update cart method
- Switcher for update headers for cached pages (need only for some stores)
Fixed
- Fixed category page update if cache in custom folder
- Turpentine varnish compatibility
- Fixed incorrect crawler id for category urls with additional parameters
- Fixed cms page update if cache in custom folder
- Fix breadcrumbs excluding
Documentation
- Fixed wrong link
1.0.39
(2017-03-21)
Fixed
- Fixed installation error (for some stores)
- Fixed error with Zend_Cache_Backend_WinCache
Documentation
- Info about excluding static block
1.0.38
(2017-02-02)
Improvements
- Improved flushing of tags after mass product save
1.0.37
(2017-01-31)
Fixed
- Fixed an issue with incorrect tags (for some stores)
- Fixed error if Amasty_Preorder disabled ( if FPC use amasty_preorder dependence )
1.0.36
(2017-01-12)
Fixed
- Fixed an issue with update blocks which added in template if Blocks HTML output enabled
1.0.35
(2017-01-12)
Fixed
- Fix help description error (from version 1.0.34)
1.0.34
(2017-01-12)
Improvements
- Ability disable flushing of old cache
1.0.33
(2017-01-11)
Improvements
- Ability to ignore the url parameters for a given page
Fixed
- Fixed an issue with slow database query
1.0.32
(2016-11-30)
Improvements
- Tags with unique prefix
1.0.31
(2016-11-21)
Improvements
- Small info block
Fixed
- Fixed crawler error if store was deleted
Documentation
- Added flush cache button in configuration section
1.0.30
(2016-11-11)
Features
- Ability flush cache from info block
Fixed
- Fixed an issue with mage registry key exception
1.0.29
(2016-11-09)
Fixed
- Fixed an issue with filter for crawler urls by store in admin panel
1.0.28
(2016-11-09)
Fixed
- Fixed an issue with cart update (for some stores)
1.0.27
(2016-11-09)
Fixed
- Fixed and issue with empty cachable actions
1.0.26
(2016-10-26)
Improvements
- Ability set block id for excluding block
1.0.25
(2016-10-18)
Fixed
- Fixed an issue with tags for logged in users (for some stores)
1.0.24
(2016-10-06)
Fixed
- Fixed an issue with tags after cache reset
- Fix warning (for php 7)
1.0.23
(2016-09-27)
Fixed
- Fixed warning for product viewed container
- Fixed an issue with excluding of Mirasvit SEO breadcrumbs block
1.0.22
(2016-09-22)
Improvements
- Information about cache count
1.0.21
(2016-09-22)
Improvements
- Information about cache count
Fixed
- Fixed custom dependence
1.0.20
(2016-09-21)
Fixed
- Fixed an issue with mobile design
1.0.19
(2016-09-20)
Improvements
- Htaccess authentication for crawler
Fixed
- Fixed an issue with first user visit performance
- Fixed and issue with incorrect content (for some stores)
- Fixed an issue with form key update (for some stores)
1.0.18
(2016-09-06)
Improvements
- Validator improvement
Fixed
- Fixed an issue with warning (for some stores)
- Fixed an error for logged in customers (magento ee)
- Fix an issue with noroute page in crawler (nginx server)
Documentation
- minor improvement
1.0.17
(2016-08-22)
Fixed
- Fixed an issue with preg_match warning
1.0.16
(2016-08-22)
Improvements
- Ability disable crawler for certain store
1.0.15
(2016-08-17)
Improvements
- Ability easily update extension after adding custom code
Fixed
- Fix an issue with double notice
- Fixed an issue with update products on home page
- Fixed an issue with cache update (for update attributes)
- Fixed an issue when crawler is not working (for stores in which some characters are removed from the user agent)
- Fixed an issue when last block which was excluded from cache is not applied
1.0.14
(2016-07-19)
Improvements
- Improvement of global dependencies
- Improved block hole punching
Fixed
- Fixed an issue with incorrect Debug Hints
- Fix translation method error
Documentation
- Improved description of dynamic blocks
1.0.13
(2016-07-13)
Improvements
- Improved cms block hole punching
- Crawler ability don't determine whether SSL certificates are validated
- Code improvement and improved information
Fixed
- Fixed an issue with hide info if configuration cache enabled (internal)
- Fixed an issue with v2_soap if FPC info enabled
1.0.12
(2016-06-10)
Improvements
- TB_Develop compatibility
Fixed
- Fixed an issue with Zopim Chat customer name if customer is logged in
1.0.11
(2016-06-07)
Features
- Added ability to exclude cms blocks
Improvements
- Ability exclude product_widget_viewed widget inside cms block
- Improved dynamic cart block
- Mediarocks_RetinaImages compatibility
- Alioze_AjaxCart compatibility
- Em_theme compatibility
Fixed
- Fix incorrect info block if Turpentine Varnish Cache installed
- Fixed an issue with update of similar blocks
- Fixed an issue where form_key was added incorrectly
- Fix notice
- Fixed an issue for magento ee with error when try get customer id
1.0.10
(2016-05-11)
Features
- Added ability to set limit for crawled urls
Improvements
- Added "Limit for crawled urls" in Optimal Configuration
- Info about ignored pages
- Improved use of FPC tags
- Magestore WebPOS compatibility
Fixed
- Fix error when customer logged in (magento ee)
1.0.9
(2016-04-21)
Fixed
- Fixed an issue with wrong avg response time in log (affects from 1.0.5.5)
1.0.8
(2016-04-18)
Fixed
- Fixed an issue where category was not updated if use "Minimal set of tags" and configurable product was sold (affects from 1.0.5.3)
- Fix notice (affects all)
- Fixed an issue with 404 error for store with core/Mage modification (affects all)
- Fixed an issue with delete crawler urls if not enough permission (affects all)
1.0.7
(2016-04-08)
Improvements
- Small code improvement
1.0.6
(2016-04-05)
Fixed
- Fixed an issue where reports was not correct (affects from 1.0.5.5)
1.0.5.9
(2016-04-04)
Improvements
- Custom dependences and default configuration
1.0.5.8
(2016-04-04)
Improvements
- FPC speed if compare block exist
- Ability add store custom dependences
- Show add tags observer in debug info
Fixed
- Update welcome message for logged in customers if welcome is not block (affect from 1.0.4)
- Fix clear message (affect from 1.0.5)
1.0.5.7
(2016-04-01)
Fixed
- Fixed an issue with expired cache (affects all)
- Fixed an issue with debug log (affects from 1.0.5)
1.0.5.6
(2016-03-31)
Improvements
- Installation improvement
Fixed
- Compatibility with version 1.0.1 (affects from 1.0.5)
- SOAP API compatibility (affects from 1.0.4)
1.0.5.5
(2016-03-31)
Fixed
- Fixed an issue with m_fpc_log table size (affects all)
1.0.5.4
(2016-03-30)
Fixed
- Fix admin panel issue (from 1.0.5.3)
1.0.5.3
(2016-03-28)
Fixed
- Fix breadcrumbs (from 1.0.4)
- Fix expired sessions (all)
- Fix block dissapearing (all)
- FPC-108 - fix incorrect action info (from 1.0.4)
Improvements
- Page load improvement
- Ability load registers for current_category, current_product, product in custom.xml
- Ignored url parameters configuration
- Tag level
- Update message without cache disubling
- Updated in_session block
1.0.5.2
(2016-02-22)
Fixed
- Fixed an issue with notice (affects from 1.0.4)
- Fixed an issue with disk_free_space warning (affects from 1.0.4)
- Fixed an issue with wrong SID=U replace (affects all)
- Custom dynamic block bug: Fixed bug with js error "TypeError: document.getElementById(...) is null" (affects from 1.0.4)
Improvements
- Improved performance of dependencies for containers
- Ability add visited urls in Crawler URLs without fpc.log import (directly in database)
- FPC-81 -- Ability to disable url filter for fpc.log
Documentation
- Improved FAQ
1.0.5.1
(2016-02-11)
Fixed
- Fixed an issue with slow speed (for some stores)
1.0.5
(2016-02-10)
Fixed
- Fixed an issue with slow speed (for some stores)