Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
litespeed_wiki:cache:litemage:troubleshooting:no-cache-hit-header [2018/04/24 18:38]
Lisa Clarke Proofreading and Reformatting
litespeed_wiki:cache:litemage:troubleshooting:no-cache-hit-header [2019/05/17 14:34]
Kacey Schroeder [For Your License?]
Line 1: Line 1:
 ====== No “X-LiteSpeed-Cache:​ hit,​litemage” Header ====== ====== No “X-LiteSpeed-Cache:​ hit,​litemage” Header ======
  
-In a Magento 1.x store, if the ''​X-LiteSpeed-Cache:​ hit,​litemage''​ header is missing, it is an indication that LiteMage is not working properly. There can be various causes for this problem, but most likely a step was missed in the [[litespeed_wiki:​cache:​litemage:​installation|LiteMage 1.x Installation Guide]].+In a Magento 1.x store, if the ''​X-LiteSpeed-Cache:​ hit,​litemage''​ header is missing, it may be an indication that LiteMage is not working properly. There can be various causes for this problem, but most likely a step was missed in the [[litespeed_wiki:​cache:​litemage:​installation|LiteMage 1.x Installation Guide]].
  
 Go through this list, checking each item until you find what may be causing the problem. Go through this list, checking each item until you find what may be causing the problem.
  
 ===== Do you see ''​X-Litespeed-Cache:​ miss''?​ ===== ===== Do you see ''​X-Litespeed-Cache:​ miss''?​ =====
-This header indicates ​things:+This header indicates ​things: 
 +  - LiteMage is working
   - It didn't find the page in the cache.   - It didn't find the page in the cache.
   - When it loaded the page to display this time, it also cached a copy.    - When it loaded the page to display this time, it also cached a copy. 
Line 15: Line 16:
 ===== Is LiteMage Enabled... ===== ===== Is LiteMage Enabled... =====
 ==== For Your License? ==== ==== For Your License? ====
-For 1-CPU and lower licenses, you will need to purchase LiteMage as an add-on, while LiteMage ​starter ​is included in all 2-CPU and above license. If you just recently upgraded your license by adding LiteMage, you will need to register a new license key with the ''​.../​lsws/​bin/​lshttpd -r''​ command and then restart LSWS.+For 1-CPU and lower legacy ​licenses, you will need to purchase LiteMage as an add-on, while LiteMage ​Starter + LSCache ​is included in all of the current licenses as well as the legacy 8-CPU license. If you just recently upgraded your license by adding LiteMage, you will need to register a new license key with the ''​.../​lsws/​bin/​lshttpd -r''​ command and then restart LSWS.
  
 ==== In Your Configuration?​ ==== ==== In Your Configuration?​ ====
Line 44: Line 45:
 Did you try flushing LiteMage Cache and Magento Cache Storage? Do so, and then reload the page a few times. Did you try flushing LiteMage Cache and Magento Cache Storage? Do so, and then reload the page a few times.
  
-===== Is there an ESI Header? ===== +===== Have You Reached Your License'​s Cache Object Limit? ===== 
-If you see the header ''​x-litespeed-cache-control:​ esi=on'',​ then the page is cachable but it has encountered a problem. ​You may have reached your license'​s cache object limit. ​Another possible cause is a conflict with another cache solutions, such as CloudFlare.+If you see the header ''​x-litespeed-cache-control:​ esi=on'',​ then the page is cachablebut it has encountered a problem. ​One possible reason is that LiteMage ​may have reached your license'​s cache object limit. ​You should check your Magento Admin LiteMage stats for details.
  
 +===== Are You Using CDN Cache? =====
 +
 +CDN cache solutions, such as CloudFlare cache, Sucuri cache etc., may conflict with LiteMage. Please make sure to turn off CDN caches when using LiteMage.
 +
 +This example shows CloudFlare cache enabled:
 {{:​litespeed_wiki:​cache:​litemage:​troubleshooting:​litemage-cloudflare-incorrectcachesetting.png?​direct&​300}} {{:​litespeed_wiki:​cache:​litemage:​troubleshooting:​litemage-cloudflare-incorrectcachesetting.png?​direct&​300}}
  
-It's LiteMage'​s job to cache dynamic content, therefore, if you are going to use CloudFlare cache, it must be set up to only cache //static// content. See [[https://​blog.litespeedtech.com/​2017/​11/​20/​magento-monday-litemage-cdns-and-tokens/​|this blog post]] for more details.+Here's another example, where the user has turned on cache in Sucuri. In this case, you will always see ''​x-litespeed-cache:​ miss'':​ 
 +{{ :​litespeed_wiki:​cache:​litemage:​troubleshooting:​litemage-cdn-cache-problem1.png?​800 |}} 
 + 
 +If you visit the backend directly with Sucuri, you can see LiteMage running fine with ''​x-litespeed-cache:​ hit,​litemage'':​ 
 +{{ :​litespeed_wiki:​cache:​litemage:​troubleshooting:​litemage-cdn-cache-problem2.png?​500 |}} 
 + 
 +It's LiteMage'​s job to cache dynamic content, therefore, if you are going to use CloudFlare/​Sucuri ​cache, it must be set up to only cache //static// content. See [[https://​blog.litespeedtech.com/​2017/​11/​20/​magento-monday-litemage-cdns-and-tokens/​|this blog post]] for more details.
  
 ===== Is There a Vary Cookie Issue? ===== ===== Is There a Vary Cookie Issue? =====
Line 69: Line 81:
 {{:​litespeed_wiki:​cache:​litemage:​troubleshooting:​litemage-right-cookie-header-with-lscache-very-miss-hit.png?​direct&​800}} {{:​litespeed_wiki:​cache:​litemage:​troubleshooting:​litemage-right-cookie-header-with-lscache-very-miss-hit.png?​direct&​800}}
  
 +===== Are There Cache-Related Rewrite Rules in .htaccess? =====
 +Please don't place ''​RewriteRule (.*) - [E=Cache-Control:​no-cache]''​ in your ''​.htaccess''​ file. In fact, don't place //any// rewrite-rule-based cache directives into ''​.htaccess'',​ unless there is a wiki or KB article instructing you to do so. 
 +
 +Normally if you follow our wiki, LiteMage should work out of the box after installation,​ with no need to manually add anything. We have seen user-added rules break LiteMage and cause the cache miss header to display all the time. 
  • Admin
  • Last modified: 2019/05/17 14:34
  • by Kacey Schroeder