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)
Your feedback about this content is important.
Let us know what you think.