LiteMage Cache is a caching system developed especially for Magento, being the fastest full page caching system for Magento. Enabling this caching system improves load times for both dynamic and static pages by providing superior performance to Magento stores. This tutorial will guide you through the configuration and activation process for LiteMage Cache.

Requirements

We recommend that you ensure that the following requirements are met before activating LiteMage Cache:
 
- LiteSpeed Web Server 5.0+
- LSCache module
- LiteMage module
- PHP IonCube Loader

Varnish or other caching systems must be disabled.

Configuring the Cache Storage Path

It is important to specify the cache storage path for LiteMage. This operation can be performed at the server level in the Cache settings for LiteSpeed, for each virtual host if you manage multiple Magento stores on the same server. Use the code below to configure each vhost on your server, changing the path accordingly. It is recommended to use SSD storage for maximum performance.

<IfModule LiteSpeed> CacheRoot /path/to/litemage/cache/dir </IfModule> 

 

Step by step installation

The activation process for LiteMage Cache requires a few steps:

  • activating the LiteMage Cache module at the web server level
  • installing and activating the LiteMage Cache extension in Magento
  • extension testing
  • advanced settings

 

Activating the LiteMage module

To enable LiteMage Cache, add the following code to the .htaccess file in the root directory of your Magento instance:

 <IfModule LiteSpeed>
  LiteMage on 
  </IfModule>

 

Install and activate the Magento LiteMage extension

LiteMage has an extension that is used to configure and control the Magento cache. Make sure you are using the latest stable version at Litespeed.

  • log in to the Magento admin panel
  • disable Compilation from System/Tools/Compilation - if active
  • navigate to System> Configuration> Web and set Use SID on fronted to NO
  • navigate to System> Magento Connect> Magento Connect Manager - you will be prompted to re-enter the administration password
  • if you are upgrading LiteMage to a new version you need to uninstall the old version for the first time
  • the LiteMage update will overwrite the config.xml file for LiteMage. Before updating, we recommend that you make a backup for config.xml
  • to uninstall an older version of LiteMage, select Uninstall from the drop-down menu next to LiteSpeed_LiteMage
  • access "Direct package file upload". Select the downloaded package and upload it. Then click Return to Admin
  • you need to log out and then log back in to the Magento admin panel
  • go to System> Configuration; click on LiteMage Configuration in the menu on the left
  • in the General Settings section set Enable LiteMage Cache to "Yes"
  • click on the "Save" button
  • navigate to System> Cache Management. In the Cache Storage Management section, check the box next to Configuration and then click "Submit"
  • you can now run or reactivate the compilation

At this point LiteMage should be active and functional for your Magento store.

Testing

To check the functionality of the LiteMage extension, open a new tab in your Magento store, perform some refreshes. If LiteMage is functional you should have the message "X-LiteSpeed-Cache:hit,litemage"  in the header in response.

Recommendations and troubleshooting

Enabling LiteMage for your IP only:
For deployment and development you can test the functionality of the plugin only for your IP. From the LiteMage Cache Configuration section of the administration panel, add your IP address in the Enable LiteMage Cache Only for Listed IPs section. After performing the tests, remove the IP.

Clearing LiteMage Cache
After LiteMage Cache has been enabled, in the System> Cache Management section you have a "Flush Magento Cache" or "Flush Cache Storage" button. This button will clear the LiteMage cache.

"Your installation of LiteSpeed Web Server does not have LiteMage enabled"
If you receive the error message "Your installation of LiteSpeed Web Server does not have LiteMage enabled", make sure that you have activated the LiteMage plugin in the .htaccess file.

LiteMage defines a number of ESI blocks for certain sections of pages that do not enter the cache system (known as hole punching). To view these sections, add ? LITEMAGE_DEBUG = SHOWHOLES at the end of the verified URL

LiteMage Cache Warmup
Magento includes some cronjobs that crawl the website and do a "warm up" for the full page cache (generates the cache). To enable LiteMage cache warmup go to System> Configuration> LiteMage Configuration> Cache Warmup and set Enable Cache Warmup to "Yes"

 

Advanced settings

The default LiteMage settings generally work for most Magento websites. In some cases, some custom stores need additional configurations to operate 100%. You can add additional ESI blocks to organize non-cached blocks. For this operation it is necessary to edit the configuration file: app/code/community/Litespeed/Litemage/etc/config.xml.

To modify this file and perform the configurations, it is recommended to get help from a web programmer.
 

If you encounter problems in applying the above instructions please contact us. HostX offers the best Magento web hosting service and can assist you in solving your problems.

Was this answer helpful? 0 Users Found This Useful (1 Votes)