Lesti_Fpc is internal full page cache for Magento. 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 cached:

  • 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

Excluding a category or product

You can exclude for example a category with id 25, by adding CATEGORY_25 to Bypass Handles in the configs of FPC.

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.

Filecache gets too big?

You can compress the cached data with gzcompress from level 0 to 9.

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.

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, 1.9

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.

1,059 thoughts on “Lesti_Fpc”

  1. First of all, thank you for the extension.
    We are having to refresh cache very often and if we forget, only a few products or none are displayed in some categories.
    Any advice?

  2. Hi Gordon,

    Thanks for your extension, I am facing weird issue top.link cart is not updating when user log in it works well when user as guest.

    Please help me to sort this out.

    Thanks in advance.

  3. Hi,

    I know we don’t have to use lestifpc with varnish… but can we? Will Magento work properly with lestifpc anf Varnish on? I have configuration, Varnish is working only if no one is logged in and have nothing in a basket. Eg. If have something in a basket… Magento is slow… will lestifpc can help?

  4. Hi,

    Thought I’d share this with other users of this great extension – I’ve made a shell script to build the cache of the site each night – make sure you have your sitemap refreshing each night too. Its really simple but effective. It opens the sitemap and finds all the urls in it and wget’s them one by one which builds the cached version. Create the file in your shell directory and set a cron job to action it at a suitable time for your store. I also have a separate script to empty the cache directory before I run this;

    # Pixie Media Cache Warm. www.pixiemedia.co.uk
    # Uses the sitemap to reload the Page Cache by accessing each page once

    wget –quiet http://www.YOURDOMAIN.co.uk/sitemap.xml –output-document – | egrep -o “http://www.YOURDOMAIN.co.uk/[^<]+" | wget -q –delete-after -i –

    # File end

    I am now trying to work out how to build the cache for a logged in user – if anyone has any thoughts on that, I'd really appreciate feedback.

    1. sorry forgot to mention, save this file as;


      and run it from cron like this – 2am in this example;

      00 02 * * * cd /var/www/vhosts/YOURSITE/httpdocs/shell/ && sh cachewarm.sh | mail -s “Cache Rebuilt” your@email.co.uk

    2. Hi Tom, great idea, thanks so much!

      It’s not working for me, it downloads the sitemap in directory and then I get this:

      --2015-07-23 20:07:39-- http://xn--output-document-du9h/
      Resolving –output-document (xn--output-document-du9h)... failed: Name or service not known.

      Do you know what is it? Thanks so much!

  5. Hi Gordon,

    Great extension! But I’ve encountered something weird, let say if the FPC is enabled, the top links appears at all pages (home page, category page, others content pages) except for the individual product details page. So I tried disabled it and the top links appears for the product details page. Then I went on to enable it again but this time remove catalog_product_view from Cachable actions and now the top links appears at every page.

    So I am just wondering why this could happened, and it is OK to remove the catalog_product_view from Cachable actions right? Just that the product detail page will not be cached right?


    Best regards,

      1. Hi Gordon,
        Thanks for your reply, and yes I did. I tried refreshing all the cache types, Flush Magento Cache and Flush Cache Storage as well. But the top links just wouldn’t show until I remove catalog_product_view from System -> Configuration -> Advanced -> System -> Lesti FPC -> Cachable actions.

        Best regards,
        Chuilynn Wong

  6. I have a problem.
    I installed the extension and in the topmenu (which I have override), I have a link. These link shows My account or Login.
    The problem is that these link is not showing the first time. The second time it does.
    What can be the problem here?

  7. Hi Gordon,

    Post the patch installation of SUPEE–6285 removal of the products are not updating from the toplinks.

    please help me to sort the same.


  8. Hi,

    I see that the price changes are not reflected on my site. The price is only reflected when I flushall redis cache.

    Now my question how can I avoid caching the price block, what is the price block called? could someone guide me please?


      1. Hello Gordon,

        That does not happen in my case regardless what I edit and save or add new product and save. I have to flush cache every time.

        How can I disable current rate from being cache because at the moment the euro which is base currency is being converted with rate of other currencies that are cached which mean old rates. New rates are not imported but not used because of cache issue.
        Please guide me.

        1. Hi Gordon,
          I Figured that out, I just had to add “catalog_category_view,” to dynamic blocks. My question whether it is okay and it is not going to decrease the page speed?

          Thanks in advance

  9. Dear Lesti,

    We have created a few static blocks in CE 1.9.2, and then loading them with/as widgets. This doesn’t seem to be working with the RWD Theme. The first static block seems to be rendered on all places (header, left, right and in the footer). Any ideas on this? The Ultimo Theme seems to be working perfect, and really fast (Multi Store Environment).

    Best regards from Sweden,

  10. Hi Gordon,
    Thank you for your great extension. I’ve been using it for a long time.
    Now in the new project, I’ve experience a prolem.
    My footer block has a child, called bottom.wrapper (type page/html_wrapper). This block show globaly as default, except some specific page, such as shopping cart, checkout onepage, ….
    The problem is, if the first visit page that generates cache is homepage (or some pages that include bottom.wrapper as default), the footer block will be cached, then bottom.wrapper block will be shown even in above specific pages. If the first visit page that generates cached is the above specific pages, bottom.wrapper will not be included in footer cached, then all other pages won’t see the bottom.wrapper.

    How to deal with it? How to configure to make sure that bottom.wrapper will show as desire.
    Thank you again.

      1. Thank you for kinda reply.
        I eventually found out solutions.
        Currently I’m facing another problem that may caused by Lesti Fpc.
        I set cachable actions included cms_index_index.
        I visit homepage by http protocol. The homepage must be cached. Then, I visit the homepage again but by https protocol. Webpage is completely broken because resource from http protocol has been blocked. I view source of the page, I see all css and js files are loaded from http protocol (I think) because the page has been cached before.
        To ensure, I temporary remove cms_index_index from cachable actions. Pages load fine, both http and https, because they are not cached.

        How to deal with it?
        Thank you again.

        1. Hello Khanh,
          can it be, that you have something like a loadbalancer in front of Magento? So that for the webserver Magento is running on, http and https come over the same port?

          1. Hello Mr. Gordon,
            My architecture is:
            http: (Haproxy) => (Varnish) => (Nginx)
            https: (Nginx)

            Proxy servers may cause this problem, but in above architecture, https doesn’t run on proxy server, it goes directly to webserver.

            How should I configure the architecture to be compatible with Lesti FPC?

            Thank you.

  11. Hello, everything work really well, only a problem:
    after the login the user can’t write a review becuase for the system he is still not logged in.

    (because only signup user can add a review in my magento)

    How i can fix this? thanks


  12. Hi Gordon
    Thanks for the reply ,In which part of the LestiFPC i want add the action name. please help me.Thanks in advance

  13. I have installed lesti fpc cache on my site. It has been worked properly. After upgrading the site from 1.7 to it causes problem with “j2t ajax cart” dropdown.

    If we add, delete or update any product from cart, does not reflecting.

    Please help me regarding this.

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=""> <s> <strike> <strong>