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:installation [2017/09/14 18:28]
Jackson Zhang [Updating]
litespeed_wiki:cache:litemage:installation [2018/10/02 16:24]
Lisa Clarke [Turn On/Off LiteMage in Magento Configurations] Proofreading
Line 57: Line 57:
 ===== LiteMage Extension for Magento Installation ===== ===== LiteMage Extension for Magento Installation =====
  
-The LiteMage extension for Magento needs to be installed for each Magento installation. Varnish cache and other full page caches must also be disabled ( including Magento built in full page cache ).+The LiteMage extension for Magento needs to be installed for each Magento installation. Varnish cache and other full page caches must also be disabled ( including Magento built in full page cache ). Normally locate the xml file for the modules located at app/​etc/​modules/,​ For example, Extendware_EWPageCache.xml, ​ and change ''<​active>​true</​active>''​ to ''<​active>​false</​active>''​. Alternatively,​ you can rename the xml to other name such as adding ''​.disable''​ to it: ''​mv Extendware_EWPageCache.xml Extendware_EWPageCache.xml.disable''​. You will need to go to system->​cache management->​ Configuration (refresh the configuration) and flush the cache storage . 
  
   Note: Updating LiteMage will overwrite LiteMage'​s config.xml file; be sure to backup your   Note: Updating LiteMage will overwrite LiteMage'​s config.xml file; be sure to backup your
Line 75: Line 76:
 **Note:** If you are using any of our other LiteSpeed Cache plugins, please see **[[litespeed_wiki:​cache:​common:​logged-in-cookie-conflicts|Handling Logged-in Cookie Conflicts]]**. **Note:** If you are using any of our other LiteSpeed Cache plugins, please see **[[litespeed_wiki:​cache:​common:​logged-in-cookie-conflicts|Handling Logged-in Cookie Conflicts]]**.
  
-===== Turn On/​Off ​LiteMage ​in Magento ​Configurations ​=====+===== Turn LiteMage ​On/Off in Magento ​Configuration ​=====
  
-  - Navigate to System ​-> Configuration and in the left side menu under "LITEMAGE CACHE" ​click "LiteMage Configuration"+  - Navigate to **System > Configuration**, and in the left side menu under **LITEMAGE CACHE**, click **LiteMage Configuration**
-  - Under General Settings, set **Enable LiteMage Cache** to "Yes". {{:​litespeed_wiki:​cache:​litemage:​litemage-yes.jpg?​|}} +  - Under **General Settings**, set **Enable LiteMage Cache** to ''​Yes''​. {{:​litespeed_wiki:​cache:​litemage:​litemage-yes.jpg?​|}} 
-  - For initial deployment, we recommend running LiteMage in test mode+  - For initial deployment, we recommend running LiteMage in test modeUnder **Developer Testing**, add your IP address to **Enable LiteMage Cache Only for Listed IPs**. Remove your IP when done with testing. {{:​litespeed_wiki:​cache:​litemage:​litemage-testip.png?​|}} 
-    - Under Developer Testing, add your IP address to **Enable LiteMage Cache Only for Listed IPs**. Remove your IP when done with testing. {{:​litespeed_wiki:​cache:​litemage:​litemage-testip.png?​|}} +  - Click the **Save Config** button at the top of the screen. 
-  - Click the "Save Config" ​button at the top of the screen. +  - Navigate to **System > Cache Management**. Under **Cache Storage Management**, check the box next to **Configuration** and click the **Submit** button to refresh the configuration cache. ​
-  - Navigate to System ​-> Cache Management. Under "Cache Storage Management", check the box next to "Configuration" ​and click the "Submit" ​button to refresh the configuration cache. ​+
  
 Notes: Notes:
  
-  * To turn off LiteMage, set **Enable LiteMage Cache** to "No" ​and refresh the configuration cache again. +  * To turn off LiteMage, set **Enable LiteMage Cache** to ''​No'' ​and refresh the configuration cache again. 
-  * If you encounter a "Your installation of LiteSpeed Web Server does not have LiteMage enabled." ​error message, make sure that your LSWS has the LiteMage module and that you have enabled LiteMage in your Magento ​".htaccess" ​file. (Refer to the "Turn on the LiteMage Module" ​step above). +  * If you encounter a ''​Your installation of LiteSpeed Web Server does not have LiteMage enabled.'' ​error message, make sure that your LSWS has the LiteMage module and that you have enabled LiteMage in your Magento ​''​.htaccess'' ​file. (Refer to the **Turn on the LiteMage Module** step above). 
-  * Once LiteMage Cache is enabled, a Flush LiteMage Cache” button will show up under System ​-> Cache Management. If you click Flush Magento Cache” or Flush Cache Storage, it will automatically flush LiteMage Cache as well. +  * Once LiteMage Cache is enabled, a **Flush LiteMage Cache** button will show up under **System > Cache Management**. If you click **Flush Magento Cache** or **Flush Cache Storage**, it will automatically flush LiteMage Cache as well. 
-  * For LiteMage to work correctly, you must have both "Configuration" ​and "Layouts" enabled ​under System ​-> Cache Management. If you are using Magento Enterprise, you must also disable "Page Cache".+  * For LiteMage to work correctly, you must have both **Configuration** and **Layouts** ''​Enabled'' ​under **System > Cache Management**. If you are using Magento Enterprise, you must also ''​Disable''​ **Page Cache**. 
 +  * LiteSpeed doesn'​t need anything from **Blocks HTML output**. Leave it ''​Enabled''​ to start, but if it causes trouble, you can set it to ''​Disabled''​.
 {{ :​litespeed_wiki:​cache:​magento-cache-management-li-80-e.png?​nolink |}} {{ :​litespeed_wiki:​cache:​magento-cache-management-li-80-e.png?​nolink |}}
  
Line 119: Line 120:
  
 Use your browser'​s developer tool to check the response header for the HTML file. This can usually be done by right clicking on the page and selecting some form of “Inspect”. Then click on the “Network” tab in the inspector and reload the page. If you see **“X-LiteSpeed-Cache:​ hit,​litemage”** in the response header for the HTML file(usually listed first), then the page is being served by LiteMage Cache. You should see **"​X-Litespeed-Cache:​miss"​** for the first time visit page, then if you refresh the page, you should see **“X-LiteSpeed-Cache:​ hit,​litemage”**. If this is not the case, please verify if there is any step missed from above, or try [[litespeed_wiki:​cache:​litemage:​troubleshooting|this wiki]] for troubleshooting steps. ​ Use your browser'​s developer tool to check the response header for the HTML file. This can usually be done by right clicking on the page and selecting some form of “Inspect”. Then click on the “Network” tab in the inspector and reload the page. If you see **“X-LiteSpeed-Cache:​ hit,​litemage”** in the response header for the HTML file(usually listed first), then the page is being served by LiteMage Cache. You should see **"​X-Litespeed-Cache:​miss"​** for the first time visit page, then if you refresh the page, you should see **“X-LiteSpeed-Cache:​ hit,​litemage”**. If this is not the case, please verify if there is any step missed from above, or try [[litespeed_wiki:​cache:​litemage:​troubleshooting|this wiki]] for troubleshooting steps. ​
 +
 +If you see something like ''​x-litespeed-cache-control:​public,​max-age=86400''​ and ''​x-litespeed-tag''​ after refresing a few times but still no ''​ x-litespeed-cache:​miss,​litemage''​ or ''​x-litespeed-cache:​hit,​litemage'',​ the common reason is a cache root permission problem. virtual host cache root is normally set to ''/​home/​$USER/​lscache''​ and it should be owned by ''​nobody:​user''​ instead of ''​user:​user''​. ​ If somehow you manually created this directory with ''​user:​user''​ ownership, or you manually changed it to ''​user:​user''​ ownership, there will be a cache module write permission issue as described above. You may also encounter the issue with some old cache files. To fix the problem, remove the ''/​home/​$USER/​lscache''​ folder completely and restart the web server. The cache root folder (normally ''/​home/​$USER/​lscache''​) will be created with correct ownership and permissions automatically during the restart. After restart, you should see the ''​x-litespeed-cache:​hit,​litemage''​ header.
  
 You can setup [[litespeed_wiki:​ cache:​litemage:​troubleshooting:​warmup|cache warmup]] to warmup your litmage to ensure visitors'​ browsing served from cache instead of backend php and avoid "​X-Litespeed-Cache:​miss"​. You can setup [[litespeed_wiki:​ cache:​litemage:​troubleshooting:​warmup|cache warmup]] to warmup your litmage to ensure visitors'​ browsing served from cache instead of backend php and avoid "​X-Litespeed-Cache:​miss"​.
  • Admin
  • Last modified: 2018/10/02 16:24
  • by Lisa Clarke