LiteSpeed cache vs WP Super Cache

If you use WordPress (or any other CMS —Content Management System— such as Drupal, Joomla or another), any page of your website is made up of different elements that, although they are all seen in the same place, come from different corners of the server. Text, style libraries (CSS), scripts, images and much more are called when you enter any section in order to “render” the layout as expected. Of course, making these calls and arranging the elements in place takes several seconds, but luckily, what we call a “cache” has been invented.

The cache is an optimized compilation of all the elements that make up each section of your site, allowing the content to be presented to the fewest possible number of calls to the server. To create it and enjoy the speed of navigation that it brings to our site, we require the installation of a plugin.

In this note we will make an analysis of the two most used cache creator plugins in the market: Lite Speed Cache Y WP Super Cache. We will discuss its operation, its cost, and we will make a point-by-point comparison.

Let's compare LiteSpeed Cache with WP Super Cache

Generating a cache in WordPress is a process adaptive. For example, on sites with specific areas for different users, a single cache content for all is not possible. However, both Lite Speed Cache What Super Cache they have an engineering prepared to solve this issue, and, depending on the contexts, one of them can work better than the other.

WP Super Cache

WP Super Cache offers three alternatives to create cache: Simple, Expert, Y WP Cache.

The first two, Simple Y Expert, allow to generate what WPSC calls a “supercache”, that is, the dynamic content dump to a static file in HTML5. The third option, WP Cache, is a hybrid between this method and the possibility that small portions continue to be called dynamically. Why? Because this allows certain parts of the content, specific to each logged in user, to be completed as needed (example: in an account administration section, all users will see the same page, the same design, the same indications, titles and information , with the exception of your own private data, such as name, address, email, etc.). Secondly, WP Cache it is useful for caching feeds or URLs that contain parameters.

The method WP Cache Logically, it achieves a lower browsing speed compared to the methodologies Simple Y Expert, but it is indicated for the mentioned cases.

The difference between the method Simple and the Expert is that the latter adds "rewrite" rules to the .htaccess file at the root of our site on the server. Since this file is pretty much the first thing a browser reads when entering your site, creating instructions in it allows you to ignore the dynamics of PHP, giving the browser static files directly. As you can imagine, it is the method that gives the most speed to navigation.

The method Simple is very similar to Expert, but in the first one the browser still goes through the PHP engine to get to the static content. However, since it does not involve instructions within the .htaccess file, the WP Super Cache developers themselves recommend it as the easiest solution.

LiteSpeed

Lite Speed Cache works pretty much the same way as the method Expert of WP Super Cache, but there is a notable difference: it is not the plugin that does the caching. How can it be? Because in this case there is a LiteSpeed module installed directly on the server. So, what the plugin does is communicate with it, and only that. Cached pages are not even stored within the WordPress platform; everything works at a previous level, that of the server.

Just like the method Expert of WPSC, LiteSpeed it requires the addition of instructions inside the .htaccess file since it is the only way to work at the server level and, on the other hand, to avoid the cumbersome call header that occurs in PHP.

LiteSpeed It perfectly uses dynamic cache portions to be able to cache the private content of logged in users, but it is more flexible than its competitor. when discussing
about eShops we will expand its operation.

Purging Cache as needed

The cache, although static, is not and should not be eternal. From time to time it must be updated, this to ensure that its content is always the same as the current site. For example, if we make content or layout changes, as well as enable or disable a plugin, the cache needs to be purged to reflect the changes. So much WP Super Cache What LiteSpeed allow purging
of a page or the entire site with a click, but they also enable you to set the time at which they do this automatically for all content. The way to do this is by setting an expiration time (in English, TTL, for Time to Live, or lifetime). It will be a time limit, measured in seconds (in the order of 300,000 seconds), which establishes the time in which
our cache is considered "fresh".

WP Super Cache

If we modify, for example, the text of an entry, add a photo, or make comments, the static content of said entry is automatically regenerated.

LiteSpeed

It does exactly the same thing, and also takes a second precaution that allows us to gain speed: since static content, as we said before, is not saved within the WordPress file structure but within the server itself, the LiteSpeed plugin can establish connections between the changes, acting "intelligently" when detecting that content on our site has changed. Through an internal labeling system, LiteSpeed infers what other content related to that changed also needs to be updated. In addition to being safer, it's faster because its efficiency on how much to erase/regenerate, and how much not, is much higher.

Regardless of the plugin, there will always be a folder on the server dedicated to archiving the generated static content. This space grows as the site is browsed, and here the important thing is to measure what maintenance tasks both plugins perform to maintain a fair size of its size.

Management of cache expired or purged manually

WP Super Cache

In WP Super Cache a cleaning task of the static content storage folder can be scheduled: at the determined schedule, a task is started that deletes all expired content.

LiteSpeed

Regarding LiteSpeed, cleaning expired content works in a different way. Since it uses tags to keep track of the cached content, and these are located in the shared memory of the server, it is the server itself that efficiently deletes the static files that have passed away. Also, since LiteSpeed works at the server level, when the server receives the cleanup header, it puts the “purged” tag on it without doing the cleanup right away to save latency. So when will you delete expired files? So when they are detected CPU free times, deleting files by handfuls as the level of resources allows it, and almost imperceptibly.

Variants of cached content

Both plugins allow multiple versions of the same page on your site to address certain contexts.

WP Super Cache

WP Super Cache generate cache for mobile devices. If your site features a mobile-differentiated site and layout, you can enable caching for your mobile traffic, which will cause WP Super Cache to generate two different versions of the cache, one for desktop and one for mobile.

LiteSpeed

Here you can also generate two cache variants, except that LiteSpeed works a bit more sophisticated: since its action happens on the server side, LiteSpeed can create cache variants for cookies, geographic locations and user groups, which becomes much more flexible, fast and powerful.

Cache pre-loading and reconstruction

Both plugins feature the ability to preload the cache. This means that they send their "robots" to probe your entire site, creating a cache there to speed up the timely visit to said sections (avoiding a user entering dynamic content and having to wait for it to be translated into static content at that time). moment).

WP Super Cache

the robot of WP Super Cache pretends to be a user browsing from his home computer. If the Cache Rebuild option is enabled, the static deletion pauses until the robot finishes its task, so that a preexisting supercache can be viewed by users at times when the server is busy generating a new cache. .

LiteSpeed

LiteSpeed Cache uses the same practice by default, but can also be configured to perform a mock from mobile devices. As if that were not enough, in the case of websites that use cache variants relevant to user groups (end consumers versus wholesale customers), or that require cookie variants (for example, cookies for affiliate programs), the cache can be polled by simulating a logged in user of any particular group. As long as the necessary resources exist on the server (and, remember, Duplika offers professional plans for eCommerce with optimized servers and private resources), the site can be scanned at all times simulating different users with different privileges, performing interactions specific to each group.

Compression

Both plugins produce a compressed cache. WPSC supports gzip-like compression, while LiteSpeed has so much gzip What brotli.

eCommerce

If your site has an eShop, necessarily certain pages or portions of content cannot be stored publicly. For example, the shopping cart section, the history of the products visited or the buyer profile.

Handling Private Content in WP Super Cache

WP Super Cache recommends using JavaScript to generate dynamic content, as such scripting does not interfere with caching. It is an excellent alternative that is convenient for any cache generator plugin.

If JS is not an option, WPSC allows you to employ a WordPress specific filter called wpsc_cachedata along with placeholders. These markers can be implemented with dynamically generated HTML content, and used for anything from a simple string to a shopping cart.

Since this alternative requires the use of the aforementioned WP filter, it is considered best geared towards developers who need to make their plugins compatible with WP Super Cache. Note that this dynamic content is not cached, which slows down page navigation to a great extent.

Handling Private Content with LiteSpeed

LiteSpeed will allow you to cache WooCommerce and other pages that present mixed content. With ESI (for its acronym in English: Edge Side Includes, technology that allows specific parts of a page to be cached individually), “holes” are sectorized within a public page, which are then filled in with cart information and other private content. So mixed content can be rendered to the fully cached buyer.

Gap creation handling is a native technology of LSCache, automated for WooCommerce and also for some other widely used plugins. Fortunately, ESI can be configured by the site administrator to work with any element or shortcode. Developers have the ability to maintain ESI support natively from the LiteSpeed API.

optimization

If you use speed analysis tools like Google's PageSpeed Insights or GTmetrix, you probably want to have a good amount of optimization resources to be able to implement all the improvements that these services propose.

At this point it is good to know that WPSC does not offer optimization tools beyond CDN support (Content Delivery Network —Ex: CloudFlare).

Not surprisingly, LSCache is also better prepared here: in addition to CDN support, it has database optimization, minification and JS and CSS merging, HTTP/2 push, lazy load, and more. (You can see its facilities in the table at the end of the note). When you want to improve the score with which these online tools are rated without having to resort to installing more plugins, LiteSpeed is the quintessential option.

premium services

WP Super Cache does not offer premium services. Instead, LiteSpeed yes, integrating image optimization/compression, critical CSS generation, mobile lazy-load marker generation, and all this without charging us a dime. Furthermore, these processes are executed remotely on LiteSpeed's own servers, so your hosting will not be burdened with this effort.

costs

WP Super Cache it is 100% free.

The plugin that communicates with Lite Speed Cache It is also free, but remember that a previous installation of LiteSpeed WebServer in your hosting service (which Duplika maintains for its clients).

Final Comparison

We leave you here some comparative tables that very easily allow you to appreciate the differences between both plugins. Let's see then the specific characteristics that they offer us LSCache Y WP Super Cache.

Remember: for all tables, please note that the list of features listed for WP Super Cache is covered by the information presented on the official page of the plugin.

Features offered at the time of caching

Note: For this table above, remember that enjoying the benefits of LiteSpeed requires a licensed copy of LiteSpeed Web Server with Cache Module installed on the server (Duplika has it).

Additional optimization features

Additional Premium Services

costs

Free but depends on LiteSpeed Web Server installed on the server.

conclusion

So much Lite Speed Cache What WP Super Cache offer a highly comprehensive and feature packed full page caching experience. However, and as we believe was demonstrated, the cache of LiteSpeed, running from the server, is not only more flexible when it comes to caching private dynamic portions, but also offers a host of additional optimizations that make it powerful, versatile, and our winner.

What experiences have you had with both plugins? Do you have any doubts after reading this note? Feel free to comment below!

We are Duplika

Give your site the hosting it deserves


Start » Blog » WordPress » LiteSpeed cache vs WP Super Cache
Duplika

Duplika

We are online, we are not a bot :)

I will be back soon

Duplika
Hi 👋
Select the prefered contact method to get in touch.
Connect via:
chat