Lesti::Fpc

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

635 thoughts on “Lesti::Fpc”

  1. Hey Gordon

    Great effort with this extension. We’re really happy with how it’s performing and am just about to roll it out to our live site.

    One interesting little phenomenon though, some of our dynamic blocks won’t display at all the very first time a page is visited (prior to the cache being written). The very next visit though after the cache is saved the dynamic blocks function normally and are visible.

    Would you know why this is?

    Thanks!

    Richard

        1. Figured it

          I had set a container as a dynamic block and then I had a lazy block inside of the dynamic block.

          Removed the lazy block and all back to normal

  2. Hi Gordon,

    I have installed Lest-FPC on our development server, however am often seeing this error when loading a page:

    Fatal error: Call to a member function getWelcome() on a non-object in /app/code/core/Mage/Page/Block/Html/Welcome.php on line 43

    I have also not noticed any increase in speed even after clearing all of the cache and sessions.

    Kind Regards,

    James

  3. I installed on 1.9.1 and found everything works well except that my shopping cart icon which shows no of items added in the cart shows nothing when after adding the item in cart came back from One Page Checkout to Index Page and if I further browse any category page then the cart icons shows again the right no of products. Any suggestion.?

  4. I run a magento 1.9.0.1 installation. With Lesti FPC and have problems with cache expiring to soon. My cache always seems to fail after one hour. Any pointers how to fix this? I’ve been breaking my head on this problem for days now..

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>