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.

445 thoughts on “Lesti::Fpc”

  1. I was wondering … we use aheadworks Follow up email

    And the warning messages when unsubscribing is not showing up on the frontpage

    should I add ___store + url_id to the uri params?

  2. Hi Gordon,

    Love your extension :)
    We use Amasty, Custom Stock Status extension. This extension adds custom stock status without any block to product page. The extension parses default html text and insert custom status with regular expression at observer.
    Does fpc update product page cache when Custom Stock Status change after placing an order? We use Redis and fpc.
    I removed catalog_product_view from cacheable actions because product page does not print updated stock status. But It slow down the website. Do you have a suggestion?

    Regards, MiC

  3. Hi, on version 1.1.6 “?no_cache=1″ does not work anymore.
    However if in the Admin settings for Lesti FPC, in “Miss Uri Params” I change




    It works.

  4. Hi, one more issue apparently with Redis.

    The FPC cache does not get cleared from the Admin > Systems > Cache Management; even when using the “Flush” buttons.

    As if it wasn’t aware that the “database” defined in etc/fpc.xml has a different number from what’s defined in etc/local.xml for Magento.

    The work around for now, is to put both Magento (etc/local.xml) and FPC (etc/fpc.xml) on the same Redis’ database (e.g. 1).

  5. Hi gordon, first of all really thanks for your contributin, my site now it is flying, but my cart totals is not showing up, the place where it supposed to show the shipping totals discount…

    So when it comes the checkout page, olny shows the product price, do you knows what it is happening?

    Best Regards,

  6. Hi Gordon,

    My index page has been cache whilst I had the magento profiler enabled, and now I can’t get rid of it, even though it is disabled now both in the admin and index.php. I’ve tried refreshing the cache, deleting /var/cache/manually, restarting the webserver, and saving the index page – all to no avail – the profile keep coming back on the index page no matter what.

    I modified fpc.xml lifetime to 900 (15 minutes), perhaps it will be flushed then. I have disabled fpc cache to see what happens, and surely the profiler disappears from the index page.

    Any idea what is going on and why it will not flush the cache for index page when forced?

    I am running Magento, on a vps, with apc, nginx, and php-fpm. Nginx is configured to cache content, and I have deleted those manually as well, still no luck.

    Please help.


  7. Dear Gordon,

    I use the Magento fire checkout how can i exclude the checkout from caching ? After a while the checkout seems to be very slow.

    Kind regards,


  8. Hi Gordon
    I tried you extension but after installation site anche backend disappear “Fatal error: Call to a member function addMessages() on a non-object in /var/www/vhosts/dentalgreen.it/httpdocs/includes/src/__default.php on line 14195″

    How can I resolve? Or how can I remove the extension?
    Thank you so much.

          1. Hi Gordon.
            thank you anyway for your answer.
            I would have another question: after enabling your module frontend doesn’t load css and javascript.
            Any suggestion?
            Thank you again,

  9. Hi Gordon,

    First of all, your extension it’s one of the best 3 Magento extensions that I use – great work!
    However, I try to implement it in one of my webstores and unfortunately it breaks the page layout. I want to keep my sidebar / header cart widget dynamic / lazy by using: cart_sidebar, catalog.compare.sidebar, mini_cart_top blocks in both dynamic and lazy blocks sections in LestiFPC settings but once I load again the store in my browser these blocks disappear completely: http://goo.gl/srpRAE (the cache was cleared / refreshed before and after enabling FPC). Any idea what’s causing this?

    Many thanks!


  10. Hi Gordon,

    Thanks but I tried both options – having the blocks in dynamic or lazy section trigger the same issue. Any other suggestion? Many thanks!


  11. I removed the blocks from both sections dynamic and lazy and it’s working. I think that one of my developers implemented before the hole punching technique to work with varnish (I did not have the chance to discuss yet). Anyway, thanks for support! All the best!


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>