Fork me on GitHub

Lesti::Fpc is internal full page cache for Magento.logo-450x450 This Cache needs no varnish or any other extenal software and works with events. It is an internal cache and so it replaces dynamic blocks before sending response to customer. Here is little post that explains the workflow of Lesti::Fpc.

Which pages can be cached?

Per default is caches:

  • cms_index_index
  • cms_page_index
  • catalog_product_view
  • catalog_category_view

You can add your own layout-handles in the configurations.

Which blocks are dynamic or lazy?

Per default are the following dynamic blocks:

  • global_messages
  • messages
  • right.reports.product.viewed
  • global_notices

Per default are the following lazy blocks:

  • top.links
  • cart_sidebar
  • catalog.compare.sidebar
  • wishlist_sidebar
  • welcome (Magento 1.8, for Magento 1.7 please read this post)

You can add your own dynamic block in the configurations (only blocks without children). Here you can find a explanation what dynamic and lazy blocks are. If you don’t know the name of your block in magento, here is a little post about it.

How to refresh lazy blocks?

The following actions refresh the lazy blocks:

  • checkout_cart_add
  • checkout_cart_delete
  • checkout_cart_updatePost
  • catalog_product_compare_add
  • catalog_product_compare_clear
  • catalog_product_compare_remove
  • wishlist_index_add
  • wishlist_index_remove
  • wishlist_index_update
  • wishlist_index_allcart
  • wishlist_index_configure

You can add your own refresh actions in the configurations. If you think I missed some default one, please contact me.

What about uri-params?

The following uri-params can be handled per default:

  • id
  • category
  • page_id
  • p
  • limit
  • dir
  • order
  • mode

There is a little post to explain uri parameters. You can add your own params in the configurations. If your layered navigation don’t work, please read this post.

Want to miss some requests?

These are the default miss uri params:

  • no_cache=1
  • limit=/[0-9]+/
  • dir=/[0-9a-z_]+/
  • order=/[0-9a-z_]+/
  • mode=/[0-9a-z_]+/
  • ___store=/[a-z]{1}[0-9a-z_]*/

If you didn’t want to cache a request you just have to add a parameter. here is a post that explains it.

The following session-params can be handled per default:

  • limit_page
  • sort_order
  • sort_direction
  • display_mode

You can add your own params in the configurations

What about multistore, multicurrency, mobilethemes and customergroups?

Lesti::Fpc can handle multistore, multicurrency, mobilethemes and different Prices for different customergroups.

What about cache lifetime?

Per default is the lifetime of a page 24 hours. You can edit under in app/etc/fpc.xml. Pages will be flushed after save of product, category, cms-page and cms-block.

What about apc, memcached, redis and so on?

You can set every other cachebackend like apc, memcached or redis in app/etc/fpc.xml. In the same style you did it in app/etc/local.xml. For redis you need Cm_Cache_Backend_Redis from Colin Mollenhour.

Where are the configurations?

You can refresh, disable or enable hole Cache under System => Cache Management. The configurations are under System => Configuration => Advanced => System => Lesti FPC.

Magento Version?

Lesti_Fpc is compatible with Magento CE 1.5, 1.6, 1.6.1,, 1.7, 1.8, 1.8.1

Possible conflicts?

Lesti::Fpc rewrites the block core/messages.

Here is a list of people that know how to deal with Lesti::Fpc and can give paid support.

558 thoughts on “Lesti::Fpc”

  1. Hello Gordon,

    we have 90k+ products.
    Everyday we gather all pages in cache with a crawler, after products update.

    Right after that, if I try to update a product, than all website becomes unavailable. MySQL shows – invalidating query cache entries (table list). And we have cache_query_size 10Gb.

    How does your extension works with invalidation? Does it invalidate just cache of the changed product? or all cache?

  2. Hello, I was able to configure your FPC for layered navigation.
    But, I am not able to display wishlist and top right menu correctly with lesti cache enabled.

    Disabled (user have not yet accessed)

    Enabled (user have not yet accessed)

    Disabled (user logged in)

    Enabled (user logged in)

    It just happens for the home page. On product, subcategory and (i think) everywhere else the user menu and wishlist heart button are displayed correctly.

    Magento, already added “welcome_msg, wishlist, wishlist_sidebar, links” to lazy blocks.

  3. Hi Gordon,
    Thank you for a fantastic extension to magento!

    I am having trouble getting the extension to properly cache the topLinks. I have added them as a lazy block but I have no idea what to write for “Refresh Actions” for them. Do you understand what I mean? If so do you have any suggestions? :)

      1. Thank you for your reply!

        Unfortunately that does not work for me as I suspect that my theme is a bit different. Is there anyway to stop the module from caching the topLinks element?

  4. Thank you for the great extensions you made.

    I test your Lesti FPC on my website, I leave default settings.
    The scenario is:
    1. I access to home page (cms_index_index): first problem is top.links doesn’t show.
    2. I click to a product page (catalog_product_view)
    3. I add to cart (ajax). Product is added to card successfully.
    4. I click to home page again. It’s still old page (cached), no top.links, top cart is also empty.
    5. I access to another product page
    6. Top cart is shown with product I added before, top links is shown now.

    I think that actions didn’t affect to lazy block.

    What’s is going wrong? Please help me.

  5. Hi Gordon, thanks for extension, but I am facing small problem
    with Lesti plugin. Website is http://www.salden.nl/. For all root categories view have special view like here http://www.salden.nl/nl/accessoires.html (when showing image blocks for children categories) If I clear fpc cache, all of them working properly (if i visit them from desktop computer), but if somebody goes from mobile device (for mobile version we have standard category view for root categories) then all (desktop and mobile users) will see cached standard version. So i have question, how to solve it (maybe you have some solution or ideas)?

    Thanks a lot

  6. hi,

    Not sure what version we should be downloading:
    Lesti_Fpc or Lesti_Fpc2 ?

    Magento 1.8.1, several different themes.

  7. Hi Gordon,

    Thank you for the great extensions you made. The plugin works properly until I have the Compiler Status disabled.
    When I select the button and I enable the Compiler Status, the whole site does not work anymore and I have to uninstall the plugin to make it work.

    I’m doing something wrong?

    Thanks in advanced!


      1. OK. Hopefully you’ll be able to complete all tasks successfully.

        To everyone else who are looking for a quick patch with the sidebar cart in the new responsive theme and FPC: add “minicart_head” to dynamic blocks.

  8. Hello,
    i’ve noted that if i create or update a product the FPC correctly invalid the corrispondent product page cache and so all the informations are refreshed.
    This is not the same for the categories to which the product is associated. So if i assign a product to a new category in backoffice product page, the category cahe doesn’t refresh and the product is not shown.
    I’ve found a little workaround modifiing the catalogProductSaveAfter observer forcing invalidation of all categories to which the product has been associated:

    public function catalogProductSaveAfter($observer)
    $fpc = $this->_getFpc();
    if ($fpc->isActive()) {
    $product = $observer->getEvent()->getProduct();
    if ($product->getId()) {
    $fpc->clean(sha1(‘product_’ . $product->getId()));
    /************ ADRIANO ************/
    $categoryIds = $product->getCategoryIds();
    foreach($categoryIds as $categoryId){
    $fpc->clean(sha1(‘category_’ . $categoryId));
    /************ ADRIANO ************/

    Congratulation for this great extension.


  9. Hi, i just installed it and it is working like a charm! Thanks so far!!!

    Now i have just found one problem. I am using amasty custom stock status. now this is also cached and if i change the stock status or qty, on frontend is still shown the cached status.

    I couldn’t find a block name so far, so i could not yet exclude it. Maybe someone has experienced the same problem or can give me one more hint? Thanks in advance

  10. I have problems with refreshing the cache. I am using Magento CE 1.8.1. The app servers are running on AWS Elastic Beanstalk. The backend/admin server is on an AWS EC2 subdomain. I am using an AWS Elasticache Redis instance for session, backend, and fpc. I’ve tried using both Mage_Cache_Backend_Redis and the Cm one.

    Saving products, categories, etc. does not refresh the cache for any pages. Even using Admin>System>Cache Management>Fpc>Refresh does not do anything.

    The “Flush Magento Cache” button does not do anything either. I have just recently gotten the “Flush Cache Storage” button to work on the FPC by changing the database number in fpc.xml to match the backend database number.

    I don’t understand very much about this stuff, but I tried monitoring redis while I tried to do refreshing actions. I see stuff like:

    “del” “zc:ti:403_FPC”
    “srem” “zc:tags” “403_FPC”

    in Redis. But those tags/thingies never existed. Instead

    keys *FPC*

    smembers “zc:tags”
    instead of:
    “403 FPC”

    I have no idea what any of those numbers mean, but I assume that’s a problem. Do you have any idea what is going wrong? Thank you.

  11. I installed Fpc, its working great, the only problem is it cashing right top cart, when i add to cart something on home page, then after go another page and come back to home page the top cart have 0 values. but all other pages show correct art amount, can i have any ideas to solve this problem. website is http://www.altimus.ae/

      1. Hi
        i checked everywhere and change config.xml but no luck it’s magento 1.7.x version the block name is cart_sidebar , i can see that in config.xml lazy_blocks, but when we returns to home page it always display item count 1

  12. Hi Gordon!

    Thanks for the FPC. Instructions were clear and works great.

    Recently, I have added another template (for mobile use) to my store using design exception and what I realized was that the site loaded perceivably slower than when there is only one template.

    Is this, normal?

    I’m using redis as the cache backend and on 1.7

    Thanks much !

  13. Hello – I’ve just upgraded my site to Magento 1.9 and switched over to Lesti FPC for caching. It was a simple install and everything seems to be working smoothly – Im still testing. However, I see the following on all CMS pages including my homepage. Anyone seen this or know how to fix?

    Cannot locate block: global_messages
    Cannot locate block: messages

  14. Hello, I really really love this full page cache. I only have one problem, I am hoping you might have an answer to. We are using a mobile and non-mobile version of the main menu by calling isMobile() && !Mage::helper('mobiledetect')->isTablet() ): ?>
    However, if the site gets accessed from a mobile device and caches the page, the normal navigation will not display (completely disappears from the page). Adding the top menu block seems to have no effect. I have even tried adding the entire header to the dynamic and lazy blocks but that causes the entire header to disappear.

    Would you happen to know any way to stop the mobile version of the top menu navigation from caching the mobile version and serving it to PC users?

    Thank you for your help and a great product!!

  15. Hi,

    We are running a webshop with APC and Lesti::FPC enabled. But we are having problems with the APC caching method. When the APC is using 81% it stops caching. so we need to restart the APC caching.

    does someone recognize this problem?

    Now i read in the documents from Lest::FPC that you can show the age of the caching in the header. So i checked the setting in de config of magento.

    We have enabled this setting but we aren’t seeing the age in het HTML header.

    can someone tell me if or what i’m doing wrong and were i can see the aging of the cache?

    Kind regards,


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>