LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   LiteSpeed Cache (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=30)
-   -   LiteSpeed Cache + Magento (http://www.litespeedtech.com/support/forum/showthread.php?t=4687)

webizen 02-09-2011 08:49 PM

LiteSpeed Cache + Magento
 
We have been trying to extend LiteSpeed Cache to Magento. However, due to dynamic of the application, the effort is on hold. Here is why:

1. LiteSpeed Cache is for page caching

It caches entire page output which is deemed to be static. How to determine if a page is static or cacheable in Magento is another story. A regular product page, or a category page is OK to be cached only if all the pieces/blocks on that page are cacheable/static. However, most pages have dynamic blocks for things like display number of items in shopping cart, and/or items in the cart, product comparisons, etc.

For example, if a user (guest or logged-in) adds product to shopping cart and continue to navigate the site.

In such a case, page cache actually causes more trouble than good because user may not see shopping cart number of items gets updated right away. There is no good indicator to tell when shopping cart gets updated without digging the code and add some hack.

2. The solution for that (not all the blocks are cacheable) is to open a few holes on the page for dynamic updates so called "dynamic holes". The majority part of the page is static and can be cached. For the dynamic holes, data can be retrieved via lightweight operations.

However, it is not what LiteSpeed Cache can do at this point.

J.T. 02-19-2011 12:08 PM

Glad you mention Magento but shame it's on hold!

I'm working on this myself and aim to adopt your vB approach. You are right, when they put something in the cart or start comparing items, pages should start to be rendered dynamically. Or with such "dynamic holes" indeed. But if LSWS can't do that (yet), I'm still going to try full page caching.

It will be good for Google to begin with, as Google won't add anything to cart or start comparing items. It will also be good for first-time visitors. On their first landing, they have nothing in cart or comparison anyway, so may as well impress them with a speedy website. As they come to know the site, use it more, trust the brand etc. speed can be sacrificed a little bit for extra functionality.

For the cart, you can even come up with fancy was like putting cart content quantities in a cookie of an external URL which then through external JS renders that text with cart contents. But until that, I'm happy for full page caching for new visitors and Google.

Just need to work out a Magento module which keeps a cookie that tells LSWS to show a cache page or not. My plans are coming along nicely, aim to have something working mid-March.

mistwang 08-03-2011 10:09 AM

Right now use Magento with Litespeed page cache is easy, just turn on the private cache. Then add "/checkout/", "/wishlist/", "/customer/" URLs to "Do not cache URL".
http://www.litespeedtech.com/docs/we...he/#noCacheUrl

Brent W Peterson 08-03-2011 10:33 AM

additional file modifications
 
Do I need to modify .htaccess or any other files, or is the modification in web only

webizen 08-03-2011 10:50 AM

just web (admin cp) only


All times are GMT -7. The time now is 08:07 PM.