Learn Magento 2

One of the most used Opensource E-Commerce Platform build on Enterprise level!

• Last Updated: 07/22/2020
• ( 6 minutes reading )

Magento 2 LiteMage Module Overview and Configuration Options


In our How to install the LiteMage LiteSpeed Cache module in Magento 2 tutorial, you have already learned how to enable it for your store. To get you acquainted with the LiteMage Caching module for Magento 2, we will provide you with a comprehensive overview. 

In this guide, we will attempt to cover all it has to over, along with any tweaks or configurations you can apply to get the best out of it. While most of the speed-enhancing features of the module are already baked into its core, there are a few configurations available that should be more correctly referred to as conveniences and are more likely to serve a purpose in a specific situation. Let’s begin!


Getting Started

For a start, please log into your Magento 2 admin dashboard. If you are not sure how to do so, please go to your Magento 2’s root directory. Use SSH to navigate there and then execute the command:


cat app/etc/env.php | grep frontName | cut -d '>' -f2



From the command output, please copy the text inside the single quotes. Afterward, go to your browser and enter “yourmagentostore.com/text-inside-the-single-quotes” in the browser URL tab. Please, make sure to replace “yourmagentostore.com” with your actual domain name and the “text-inside-the-single-quotes” string with the text copied from the command. Upon doing that, the Admin Login page will be launched. To login, please enter your credentials into the corresponding fields.


Magento 2 Admin Login page


Once logged, please select the “Stores” option on the side menu located on the left side. Once it is expanded, click on “Configuration”.


Access Magento Store Configuration


This action will redirect you to the configuration page. After you land there, scroll down and select the “Advanced” option from the side menu located on the left. This will present three more options, please select “LiteMage Cache”:


Access Magento LiteMage module configuration


This action will redirect you to the configuration page, where you will see all the available options.


LiteMage Configuration Settings

Within the Configuration page, you will find the following settings:

  • Context Vary Bypass - If there is a “context vary” change in the HTTP response, LiteMage will ignore it and not include it in the cache. This text field allows you to cancel this effect for all the universal cacheable contexts. If you want LiteMage to cache them, regardless of this change, please list them here. You may separate each context with a comma. 
  • Enable Custom Vary - You can use this drop-down menu to enable custom varies. This is strictly individual to the type of website, and what you want to achieve, thus you should not enable it if you are not sure. An example of a custom vary is your website locale, based on the GeoIP of the visitor. If allowed, you can choose their behavior out of 2 options:
    • Yes and allow a guest mode for the first visit - When a visitor enters your site for the first time, this option will ensure that they are served from the fully-cached version of the page. The content served will be based on a non-logged-in user view and will ignore the value of the custom vary until the visitor lands on a different page.
    • Yes and enforce vary checking on the first visit - This works oppositely of the above. It will ensure that the visitor sees the correct content from the custom vary, however, he will not be served from the cache on the first visit.
  • Enable Debug - Use this drop-down menu to activate debugging mode that will let you troubleshoot any issues related to the module.


Magento LiteMage Configuration settings


Cache Management and Overview Page

To open the cache management page for the LiteMage module, please use the side menu and click on the “System” option. Upon doing that, another menu will be expanded, please select the “Cache Management” option from it.


Magento Cache Management


After landing on the cache management page, you will notice a table section containing all the Magento 2 caching types. In order to make sure that the LiteMage module is working, the “Page Cache” has to be enabled.


Magento Page Cache Enabled


In case it is currently disabled, you have to enable it. If your Magento 2 site is in production mode, you will not be able to do this from your dashboard. We recommend using SSH in this situation to enable the cache without switching to development mode. After logging in, please navigate to your Magento 2 root directory and execute the following command:

php bin/magento cache:enable full_page


You should receive the output shown in the screenshot below, indicating the fact that the full page cache has been enabled.


Activate Magento Full Page Cache over SSH


If some of your cache types are invalidated (this could happen when you change some configuration settings within your dashboard), they need to be refreshed or flushed so that the settings can kick in.

To do so, please put a tick inside the checkboxes corresponding to the invalidated cache types and then either use the drop-down menu on the top of the table section and select “Refresh” or use the “Flush Magento Cache” button on the top right side of the screen.


Fix Magento Invalidated Cache


Here is the result if everything went through properly:

Magento Cache Type Refreshed


Lastly, this page can also give you information about the LiteMage module Usage. To check this, please scroll to the bottom, and you will see the “LiteMage Cache Status (LiteSpeed Web Server)” section and underneath a table section:


  • LiteMage Plan - This shows the current plan of LiteMage, which is on the server.
  • Public Cache Hits - Number of requests that hit the public cache since last Flush All.
  • LiteMage Cached Objects - Current count of publicly cached objects.
  • Not Cached (Limited by Plan) - Number of requests not served from the cache due to plan capabilities.


Magento LiteMage module status


There you have it! The overview of the LiteMage plugin, along with its configuration options. We hope that you have a better understanding of how it works and how you can manage it. In case you have experienced any sort of difficulties during the installation or configuration of the module, please make sure to escalate the request to our Technical Support Staff by submitting a ticket from your HostArmada Client Area.



Content Marketing Specialist

Sebahat is a young and bright woman who has become an invaluable part of our team. She started as a Customer Care Representative, mastering that role and, along the way, growing into a tech-savvy individual who is well acquainted with every support layer of the company. Driven by her aim to improve our customers’ experience constantly, she is committed to enhancing the extraordinary support we deliver.

Learn more about Magento 2 in the other tutorials that we have: