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, product or cms-page

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.

892 thoughts on “Lesti_Fpc”

  1. Hi,

    You said: “For redis you need Cm_Cache_Backend_Redis from Colin Mollenhour. ”

    but if you use LestiFPC + Magento 1.9 with Redis server, you don’t need any plugin of Colin Mollenhour…. am I right?

    Please advise

  2. I use Magento 1.9, lestiFPC and Redis server. Everything works fine together… I think… but I am not sure, because I don’t see any improvement, comparing to using APC before.

    How can I be sure everything works together as it should be? Do LestiFPC handle Redis server now? Is there any test? My config files are okay, no errors etc.

    Please advise

  3. LestiFPC hold values in text boxies under custom options in product pages. I need all data entry ‘boxies’ to be empty as it should be. It’s this possible with LestiFPC? maybe lazy blocks can sort it out? Which parameter and where should I put to make it work properly. Please advise

  4. Hello,
    how can i check if Lesti_FPC is using the right backend? i have configured memcached as backend but i am still getting new folders and files under /var/cache-fpc–*
    Is this enough under /app/etc/fpc.xml ?


    1. Hello Igore,
      you can check it on your own in the Fpc model or you debug your backend. I guess this will answer your case memcached Logs. The cache-fpc-* files occour, cause memcached is the fast and the filecache is the slow backend in Magento.

  5. Hi,

    I think I found a bug,

    While LestiFPC is enabled, websites don’t show “You have been unsubscribed” box, when pressed an unsubscribe link in mailing.


    Any quick solution for this, or we just have to wait for new version?

    1. Hello George,
      thank you for the hint. Would you like to create an issue on Github and I will fix this in the next version. If you want a quick solution, add core/session to the $messageStorage-Array in this line. I hope this will help you.

      Best Regards

      1. Thank you for the answer,

        I have this now:

        $messagesStorage =
        array(‘catalog/session’, ‘tag/session’, ‘checkout/session’, ‘customer/session’, ‘core/session’)

        But it didn’t fix it… ;(

  6. What is the best way to debug the module? I installed trough magento connect, there is definitely a speed increase one pages only my cart is not shown at all any more. Neither in dynamic or lazy blocks. Only on the cart page I see items that are in the lazy blocks e.a. top.links.

    1. Hello Bob,
      you can debug this extension like every other extension with xdebug or I personally like logging. If your cart isn’t showing, can it be, that you are using a html-minifier, or that you have a block in lazy and dynmic blocks?

      Best Regards

  7. The top cart is getting empty every time i add a product & go to home page of the website….I am using ajax for adding to cart.

  8. We have Magento 1.8 with Redis and FPC . Occasional pages are broken, I guess this is happening when some visits website on Mobile and when you try to view on Desktop , it stores the Mobile version and displays Mobile version on Desktop and all of sudden pages appear to be broken!!! Guess there is some Issue with Redis and FPC configurations . Some what similar to here https://github.com/GordonLesti/Lesti_Fpc/issues/4 but only difference we do not have separate Mobile theme we using Viewports for Mobile display .
    Any debugging tips appreciated . Thanks

  9. I have a small issue with the plugin combined with filters/layered navigation (via a plugin) on category pages.

    Got everything sorted out with the miss uri params, and filtering works just fine. However, when the cache is cleared and someone is on a filtered page ie, a brand, and refreshes the page, the filtered version is cached and displayed, which can lead to an empty category.

    Is there someway to fix this? I kind of use a workaround, by ‘warming’ al the pages by crawling the sitemap after a cache refresh, but rather have a fix for the issue.

      1. Thx, added ‘cat’ as uri parameter, lets see if it works.

        Further, great plugin, needs some configuration work, but getting great results combined with Redis.

  10. Hi Gordon,

    I need to bypass/ban lesti for onepage controller as I dont want to cache the content the data of onepage to be cached. What procedure do i need to follow and also kindly tell how to bypass/ban protocol like http/https.


    1. Hello Muhammad,
      can you explain onepage controller? A protocol can maybe only be bypassed with the event fpc_save_data_before. But I didn’t tested & is maybe not that clean.

      1. Hi Gordon,

        I used some images in top menu and these images are cached by lesti. Bt when I go to checkout page which uses https then there I am getting error that I have non secure data due to which my page is not securing. The reason behind it is that Images in top menu are cached in lesti and the same menu is showing in checkout page which causes error. What I need to do to resolve this issue.

        1. But if you didn’t add the checkout as cacheable (never do that:)), Fpc has nothing to do with checkout. Fpc caches only cacheable actions (configs). Maybe it’s the Magento Blockcache?

  11. Hi,

    Whenever our product goes out of stock it shows on listing page out of stock sticker. But when product is back in stock it still shows out of stock on lisiting page as it is cached. I am also using redis with lesti. So please suggest a solution for this issue.


  12. When running Google Pagespeed Insights after Fpc is activated, the mobile insights could not be completed. It’s saying too many redirects.

  13. hi gordon,

    is ftp compatible with php version 5.5.9?
    my server has been update tot php 5.5.9 and now i have session issues when i turn on ftp

    thank you for your time

      1. Hi Gordon,

        Website is moved to new server nothing has changed only the server configuration with has now mariadb iso mysql and runs on PHP Version 5.5.9-1ubuntu4.7

        if your extension is enable the session time is broken. (it is been define in backend magento as 14400 seconds). In front and backend after 90 seconds inactivity i’m logout out of admin or the shopping cart is empty after a page refresh and if login your logout again. No matter what i set in magento session control the time is always +/- 90 seconds.

        If i disable fpc everything is normal again. except that the front website is slower.

        on the old server i had no problems

          1. problem seems to besolved.
            PHP session.cache_expire had the value 180 and this is been changed to 360 and now i don’t have session issue anymore.

            for the rest Magento 1.7.2 is running smooth on php 5.5.9

  14. Any concerns Unsing leti in an Environment with Reverse Proxy ?
    I guess no since lesti Checks the Session and every New User from the proxy should get a New session correct ?

  15. Hi Gordon,

    I’m using your LestiFPC cache module for a while now and works perfect,

    But when we delete a product the product-page is perfecty flushed from cache, but the category page where the product is visible is not being flushed.
    Disable a product or updating the price will flush the product page and de category page’s except when directy deleting the product

    Especialy because we have extend the Cachetime for 24 hours to 7 days.
    The problem existst in Magento and 1.9.1 using FPC 1.3.6

  16. Hello Gordon

    Thank you for providing this great FPC exgtension for free, it is very much appreciated.

    I need a little bit of help with our install, I have a catalog price rule setup to reduce the price of an item for a sale. However the special price isnt being shown when the rule runs. I beleive this is due to the product page being cached by lesti.

    Do I need to add a handler for the price / special price to lesti config so that when the rules run and it changes the price/special price this is then shown on the product page.

    Again thank you for this extension


  17. Hey, i am using LestiFPC with APC on a Ubuntu 12.04 Server with PHP 5.3.

    Now we are updating to a new Server with more CPU & RAM that uses PHP5.5. I configured “opcache” as Backend because PHP 5.5 does not come with APC. For some reason the first request to the server after some time not using it takes very long (like 1.5s, instead of 0.2s). Do you know why this could happen?


  18. Thank you for the extension. However, I’ve added some dynamic block names to the config but on first page load, the html content is the placeholder html content ‘‘ from the getPlaceholderHtml() method. However, a refresh then replaces it with the correct html content.

    Is there something I’m doing incorrectly? Or did I find a bug?

  19. Ah, I just saw this comment: “You can add your own dynamic block in the configurations (only blocks without children).”

    My dynamic blocks have children. Is there a way to not cache this block or it’s children?

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>