LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > LiteSpeed Cache > LiteSpeed Cache + Magento

Reply
 
Thread Tools Display Modes
  #1  
Old 02-09-2011, 08:49 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
Default 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.
Reply With Quote
  #2  
Old 02-19-2011, 12:08 PM
J.T. J.T. is offline
Member
 
Join Date: Apr 2010
Posts: 47
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.
Reply With Quote
  #3  
Old 08-03-2011, 10:09 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
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
Reply With Quote
  #4  
Old 08-03-2011, 10:33 AM
Brent W Peterson Brent W Peterson is offline
Senior Member
 
Join Date: Apr 2010
Posts: 109
Default additional file modifications

Do I need to modify .htaccess or any other files, or is the modification in web only
__________________
Brent W Peterson
Twitter me - http://twitter.com/#!/brentwpeterson
Reply With Quote
  #5  
Old 08-03-2011, 10:50 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
just web (admin cp) only
Reply With Quote
Reply

Tags
litespeed cache, magento

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:34 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.