Learn Prestashop 1.7

Prestashop is lightweight, SEO friendly E-Commerce platform for large Online Stores!

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

How to configure the LiteSpeed Cache module for PrestaShop 1.7

Introduction

If you have installed the LiteSpeed Cache module on your PrestaShop Online Store, you should be enjoying its performance benefits already. We certainly hope that you managed to cut down the loading speed of your website with it, and if not, then you can read our article, which goes over all of its configuration options and our recommendations in regards to what you should use and when. Let’s begin!

 

Getting Started

For a start, you have to log into your PrestaShop Admin Dashboard. The login URL will vary, depending on your selection during the installation. If you are not sure which one it is, you can go to the root directory of your domain. Once there, look at the folders, and you should be able to find it. Typically, it should be “admin” with a bunch of string characters attached to it - for example, “admin37563956” so that people cannot easily guess it.

 

PrestaShop Admin Dashboard Login page

 

When you land on the login page, please enter your PrestaShop login credentials and access the Dashboard.

 

Accessing the LSCache Configuration Section

Now that you have logged in, please point your attention to the left sidebar. Click the “Advanced Parameters” dropdown, and select the “LiteSpeed Cache” option.

 

Access PrestaShop LiteSpeed Cache Module

 

This action will redirect you to the LiteSpeed Cache module configuration section. As you can see, it is divided into three tabs. In the following lines, we will separately review each of them, starting with the first "Manage" tab, open by default.

 

Manage Tab

Under this tab, you will find the option, which allows you to clear each type of cache, generated by the module individually, a few at a time, or purge them all. The first section you will see is “Purge by selection”.

It contains checkboxes, which represent each cache type. Underneath them, you will see a content box that presents the category structure of your shop. You can select and purge individual categories by selecting them with the radio button on their left side. If you want to expand all the categories and then make your choice, please press the “Expand All” button located on the top right side of the content box itself.

 

Manage PrestaShop LiteSpeed Cache

 

Once you selected all the caching types or categories you want to purge, please press the “Purge by Selection” button at the bottom.

Next up is the “Purge by ID” section. This is pretty handy if you know the IDs of your pages. Underneath this section, you will find a dropdown menu and a content box. The dropdown will allow you to select the “ID type”, which can be either Product, Category, Brad, Supplier, or CMS.

Inside the content box below, you can enter comma-separated IDs for each of the selected types you want to purge.

Finally, to clear the selected ID types, please press the “Purge by ID” button located on the bottom right corner of the section.

 

Purge PrestaShop LiteSpeed Cache by ID

 

When you perform the desired changes, please switch to the next "Configuration" tab.

 

Configuration Tab

This tab gets pretty impressive as it does give you some flexibility in the configuration you can choose for the LSCache Module.

  • Enable LiteSpeed Cache - This toggle switch either enables or disables the caching aspect of the module. Leave it enabled if you want to use the LiteSpeed cache.
  • Default Public Cache TTL - The default 86400 seconds value should be completely fine here. You can lower the value if you are still actively developing your site.
  • Default Private Cache TTL - The default value for the private cache (ESI blocks) is 1800 seconds, and we recommend keeping it as such.
  • Home Page TTL - The default value of 86400 seconds is great unless you have products that are being randomly shown on your home page. In this case, you should lower it, based on the time they are updated.
  • 404 Pages TTL - Leave the default value here, unless you want to altogether disable caching for 404 pages. In that case, set it to 0 seconds.
  • Sperate Movile View - Enable this option only if you are using a separate view for your site’s mobile version.
  • Separate Cache Copy per Customer Group - If you have separate customer groups where each one has different product prices, then enable this by selecting “Yes” from the dropdown. If each customer has the same view, regardless of their status, then leave the default “No” option.
  • Flush Product and Categories when Order Placed - This dropdown offers a couple of options that are all useful, depending on the situation. If performance is all you care about, we recommend choosing the third option, which is “Flush products when stock status changes, do not flush categories when the stock status or quantity change”. If you are tracking the stock status or quantity changes of your products, then we recommend the last option “Always flush product and categories when the quantity or stock status change” as it is the safest.
  • Enable Guest Mode - Leave this setting to the default “Yes” option. If you have a site utilizing multiple views based on GeoLocations, then select the “First Page Only” option.
  • Do-No-Cache GET Parameters - Enter a list of comma-separated GET parameters, which you want to exclude from cached URLs.
  • URL Blacklist - Enter a list of URLs, which you want to blacklist from caching. Start with "/" and do not include the domain name.
  • Enable Cache Only for Listed IPs - In this content box, you can enter IP addresses for which you want to enable LSCache ONLY. This is great for troubleshooting purposes.
  • Enable Debug Log - Allows you to deploy the “lscache.log” file that will log all the errors generated from the LSCache module.
  • Log Only for Listed IPs - Enter the IP addresses within this content box, which will be logged in the “lscache.log” file mentioned above. If left empty, every IP will be registered.
  • Debug Level - You can specify the debug level here. The higher the value, the higher the output will be inside the “lscache.log” file.

 

PrestaShop LiteSpeed Cache module configuration

 

When you alter the settings as desired, please switch to the following "Customization" tab.

 

Customization Tab

The last tab of the LSCache module is something we will not be going over in this tutorial. It requires a deep understanding of how PrestaShop works internally. If you have such knowledge, then you can configure and hole punch widgets as an ESI block and also customize their TTL, based on your needs. LiteSpeed has excellent tips on the matter on their official documentation about the module, which you should definitely check out here.

 

PrestaShop LiteSpeed Cache module customization

 

There you have it! The configuration options that are available to our clients utilizing the PrestaShop 1.7 LSCache module. If you are having issues with the installation or the configuration, feel free to contact our technical support team. They are 24/7 available at your disposal through the ticketing system integrated into your HostArmada Client Area.

 

 

...
Sebahat
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 Prestashop 1.7 in the other tutorials that we have: