Problems with LiteSpeed private cache

Discussion in 'LiteSpeed Cache' started by Sindre, Dec 27, 2013.

  1. Sindre

    Sindre Member

    Hi,

    I am having a hard time figuring out how the cache works, and how to configure it properly. From what I can see, not even the official documentation on your site seems to be correct.

    Case:
    I have a Magento ecommerce site and thus the global cache cannot be used. I have configured the cache according to the attached screenshot. I then placed this line in .htaccess:

    Code:
    RewriteRule .* - [E=Cache-Control:private,L]
    
    According to the docs this should turn on private cache for all pages.

    Yet, when I go to any page, including the cart page, it is retrieved from the public cache!? (see response headers in attached screenshot).

    What I don't understand is:

    1. Why is the public cache being used although it has been turned off in the config and I do not have CacheEnable in .htaccess?
    2. Why is the cache even being used at all on the cart page, as "/checkout" has been added as a "Do-Not-Cache Url" in the config?

    If I remove RewriteRule .* - [E=Cache-Control:private,L] from .htaccess, the page loads correctly without cache, but then no other pages are cached either.

    This does not align with what I read in the documentation, and to me it looks like the cache functionality may have some bugs.

    Can anyone from LiteSpeed shed a light on this?

    Attached Files:

  2. NiteWave

    NiteWave Administrator

    Code:
    RewriteRule .* - [E=Cache-Control:private,L] 
    Since you've enabled private cache globally, this directive is not required.
    and, this "L" may break magento logic. without "L" will be better.

    I've more experience with public cache. As of I know, quite a few busy production servers have been working well for long time with public cache enabled. is it possible you enable publish cache instead of private cache for this magento site ?
    Last edited: Dec 29, 2013
  3. Sindre

    Sindre Member

    I would like to use public cache as well, but how do you accomplish that with Magento without caching things like cart content, etc? For example, the mini cart in the sidebar or the "X items in cache" line in the header of most templates will not update correctly when the public cache is turned on.

    Do you use some custom coding/rewrite rules to create "hole punches" for Magento? Would like to hear some more about your implementation of LiteSpeed Cache for Magento.
  4. NiteWave

    NiteWave Administrator

    in fact, cache for magento already in our develop todo list, and maybe in next 1 or 2 release.

    your suggestion, like which cache feature is most wanted, may help our developer to decide the top priority of various cache options.
  5. Sindre

    Sindre Member

    That sounds great! Just let me know if you need any input, as I have many clients that would love to see an improved cache for Magento.

Share This Page