Lesti_Fpc

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.6.2.0, 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.

935 thoughts on “Lesti_Fpc”

  1. Hi Lesti!

    Thanks for this extension. Great job! However, i have a problem. I have enable the fpc cache but when enable/disable a product doesn’t refresh the catalog page! If enable a product you can find this from search but doesn’t display on catalog page! When disable the fpc cache all works fine. I don’t know, i have missed something? Fyi i use magento 1.9.1

    Thanks

  2. New to your extension, I know you’ve been asked this in the past but just wanted to check again. Do you have any recommendations for third party cache warmers or crawlers that work well with your extension? Maybe something like this? https://github.com/Marko-M/Inchoo_Precache

  3. Hi Gordon,

    I have posted a comment on a existing issue #67 about the bug with flushing category page’s in the cache if you delete a product.

  4. Hi Gordon

    how can i disable cache of a normal cms page i have create?
    page has the URL key : brand

    thanks for the help

  5. Hi Gordon,

    Is it possible to refresh a specific url from fpc?

    For example, www.abc.com/abc.html is cached. And I want to refresh this page only or delete the cache key of this page. The site is still in cached.

    Thanks

    Keith

      1. No problem. We can try to do it in coding. Any hints to do it? Should we use public function clean($tags=array()) ?

        thanks

        1. Hi Gordon,

          May I know that is there a way to delete the key of specific page? Then that page will be removed from cache.

          Thanks

          Keith

  6. Gordon,

    In your comment about Bypass Handles you write that it is possible to excluding a cms-page but you don’t give a example how? You only mention how to exclude a category

    Can you give a example please
    thank you

      1. so a CMS page must called also as a Category with ID!
        i have done this CATEGORY_103 and CATEGORY_105

        however the page layout stays the same after empty cache and second load

  7. hi Gordon,

    i’m still waiting for a answer what to use in bypass handles to exclude a cms page in lettifpc?

    regards
    Marcel

    1. Hello Marcel,
      I wanted to double check before sending again a quick comment from my smartphone. I’m very sorry, but Magento din’t add a custom handle for a cms pages. I always thought it would be like this. I will remove cms pages from the description, you can use Miss Uri Params to exclude a cms page. The only problem would be, that you would also miss the product and category with the same id.

      1. Hi Gordon,

        thank you for your answer. Miss Uri Params means that i have to added a Param behind the page call how can i use Miss Uri Params with a cms page? can you give me an example what i have to put in the Misss Uri Params field for a cms page?

        1. You just have to add a Miss Uri Param like this

          id=/^56$/

          if the cms page has id 56. Please note, this will also exclude the product and category with id 56 from cache. I will think about a better solution.

          1. Thank you Gordon,

            For know it is a solution but if you can come up with a better solution please let us know

            regards
            Marcel

  8. Hi,
    i use LestiFPC on believe-e.fr. Everything works well globaly, but i have an issue on category save. Cache is not flushed !
    When saving a product, cache is well flushed.

    Any idea ?

    Regards
    Jerome longet

  9. Hi,

    is possible to improve the Time to First Byte in LestiFPC?

    This module is superb, but FBT would be better 😉 any chance?

    ref.: http://www.webpagetest.org/

  10. I want to write a cache warmer, but there seems to be no url parameter option to force a cache refresh!

    ?no_cache=1 only bypasses the cache, but does not refresh it. Any chance we could get a ?force_refresh=1 option in a future update?

    Alternatively, how would this be handled otherwise? I am cautious about flushing the whole cache at night and rebuilding it, since our shop is pretty large.

    Great module already, though!

      1. Good point.
        But there are two easy solutions in my eyes:
        1) The parameter must match a secret key set in the backend
        2) The request must come from a specific IP set in the backend

          1. Done: https://github.com/GordonLesti/Lesti_Fpc/issues/114

            Maybe I’ll have time for a pull request for the secret parameter later, that should be simple enough from the looks of it. But don’t count on it :)

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>