Product Page Broken When Using Litespeed Cache

Discussion in 'LiteSpeed Cache General' started by Paresh, May 26, 2017.

  1. Paresh

    Paresh Member

    When using litspeed cache the website is broken. As soon as i put the htaccess code below the product page as well as some other pages are broken badly. I tried to clear cache and did everything i could, but only removing this code resolves the issue. I am not sure why this is happening. Litespeed cache is amazing for speed and this is the first time i am having issue.

    Its a multistore setting

    I removed the code so its working now but i want to use Litespeed

    Please help

    <IfModule Litespeed>
    LiteMage on
    Last edited by a moderator: Jun 20, 2017
  2. Pong

    Pong Well-Known Member Staff Member

    Can you take some snapshot and explain a little in details about what kind of problem?
    For multistore, it is important to set one virtual host cache root for all your multistore domains. Could you let 's know how did you set it up?
    Your domain header "x-litespeed-cache:hit,private". It should be "x-litespeed-cache:hit,litemage", looks like you enabled lscache instead of litemage.

    please try to look at our troubleshooting guide for the related error patterns to see how it is going.
    Last edited: May 26, 2017
  3. Lauren

    Lauren LiteSpeed Staff Staff Member

    Is this Magento2 store? For Magento2, you will need to install litemage2 from github. Also your license needs to have LiteMage module.
  4. Paresh

    Paresh Member

    It was working fine before but stopped working correctly this week.
    Its actually in a shared hosting environment and licence is provided by the host. Does the above doc apply to shared hosting.

    The magento install has two domains and is running from same installation. It does not run from seperate files. The htaccess has the magento multistore code.

    Any suggestion would be great. One of the site works fine but the other is trying to get the old files that do no exist.

    Here is the errror:
    Last edited by a moderator: Jun 20, 2017
  5. Lauren

    Lauren LiteSpeed Staff Staff Member

  6. Paresh

    Paresh Member

    Yes using magento 2. It was working fine before. I am using shared hosting and i contacted the host they say the location o f cache is - dev/shm/lsdiskcache
    In home/user there is no lscache folder
  7. Lauren

    Lauren LiteSpeed Staff Staff Member

    for your two domains, multi-site, are they pointing to same cache root? if they are under /dev/shm/lsdiskcache/domain1 and /dev/shm/lsdiskcache/domain2, then they do not share same cache storage. You will have this issue. basically you only flush one site, not the other when you need to update anything.
  8. Paresh

    Paresh Member

    The australian host has been working with Litemage, but its been couple of weeks and they are not able to fix the issue. Should there be such issue in the first place. Its hard to say why its so hard to fix this issue and why the host cannot resolve this. If its issue with the site itself, they must tell. It does not look like host has setup the litemage cache in the way suggested by litemage. They are probably looking for workaround with their current setup which obviously isnt working.

    Could there be other reason for this issue other than two cache folders? Could i do anything to fix this on my end in a shared hosting environment?

    Unable to use litemage so far although its a must-have for magento site as does pretty good job.
  9. Paresh

    Paresh Member

    The host changed their settings and created the required folder Iscache and it appeared to work on both sites running from the same magento2 installation. I installed an extension and compiled and redeployed contents. Now I am having another issue. For both of the sites only the homepage is being cached. To make it easier to explain, I have given home url and internal page url below:
    e cigarette site:
    Code:  (This url is fine)  (this url no cache)
    Drone site:
    When opening the internal pages, there is significant difference in page load time, the above e cigarette site is lot slower in internal pages than drone site. Only hope page headers show cache. Any info would be great
    Last edited by a moderator: Jun 20, 2017
  10. Paresh

    Paresh Member

    I was referring to your documentation to see any of the 3rd party app is causing the issue -
    "Here, cacheable=“false” from default.xml will prevent Magento from caching no matter which caching method is selected. Any page containing this block will be non-cacheable. If you see that layout/default.xml contains cacheable=“false”, then all pages on your Magento site will be considered non-cacheable

    The default.xml is not present below. There was an app with default.xml no cache i removed it.

    Would any of the below cause the cache to not work in pages other than homepage? It does appear that 3rd party app is causing some issue?

    couponc1@b1s4-3b-syd [~/public_html/app]# grep -r cacheable * | grep xml | grep false
    code/Webkul/Preorder/view/frontend/layout/guest_order_view.xml:            <block class="Magento\Sales\Block\Order\Items" name="preorder.order.items" cacheable="false" template="Webkul_Preorder::items.phtml"/>
    code/Webkul/Preorder/view/frontend/layout/checkout_cart_index.xml:            <!-- <block class="Magento\Framework\View\Element\Template" name="" template="Webkul_Preorder::checkout/cart/item/info.phtml" cacheable="false"/> -->
    code/Webkul/Preorder/view/frontend/layout/catalogsearch_result_index.xml:            <block class="Magento\Catalog\Block\Product\ListProduct" name="preorder.list" cacheable="false" template="Webkul_Preorder::list.phtml">
    code/Webkul/Preorder/view/frontend/layout/catalog_category_view.xml:            <block class="Magento\Catalog\Block\Product\ListProduct" name="preorder.list" cacheable="false" template="Webkul_Preorder::list.phtml">
    code/Webkul/Preorder/view/frontend/layout/preorder_guest_login.xml:            <block class="Magento\Framework\View\Element\Template" name="preorder_guest_login" template="Webkul_Preorder::guest/login.phtml" cacheable="false" />
    code/Webkul/Preorder/view/frontend/layout/sales_order_view.xml:            <block class="Magento\Sales\Block\Order\Items" name="preorder.order.items" cacheable="false" template="Webkul_Preorder::items.phtml"/>
    code/Webkul/Preorder/view/frontend/layout/catalog_product_view.xml:            <block class="Magento\Catalog\Block\Product\View" name="preorder.view" cacheable="false" template="Webkul_Preorder::view.phtml">
    Last edited by a moderator: Jun 20, 2017

Share This Page