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.

1,079 thoughts on “Lesti_Fpc”

  1. Hello Gordon,

    I have installed your extension on my website and i found problem if catalog rule is enable than sometimes it will display only product main price and sometimes it showing both price on product list and view page.

    If there any solution for this issues. Your help would be much appreciable.

    Thanks,
    Jignesh

    1. Hello Jignesh,
      what kind of catalog rules did you have? If they only work with the customer groups you can just enable Customer Groups in the configs of Fpc. But if they are more complicated, I would recommend to use the event fpc_helper_collect_params. There is a small post that explains some events in Fpc. Please note, this solution will end up with more cached site for every product/category. So the cache will grow, misses will increase and hits will decrease.

      Best Regards
      Gordon

  2. Hi Gordon,
    This is a copy of previous post August 5th, but never got your reply.
    1-One problem we are facing is that any changes we do to any product or add any product or sometimes we don’t recall having done anything and there are many products missing from the the Category page list. So we need to refresh the fPc.
    2-Layered navigation filter does not work if fPc is enabled.
    Any way to fix these issues?

    Regards, Eddy

  3. Hi Gordon,

    I got this msg:
    Fatal error: Call to a member function addStorageType() on a non-object in /home/Th/public_html/demo/includes/src/__default.php on line 11338.
    Any help would be great.
    Thanks

Leave a Reply

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