LiteSpeed Cache vs. WP Fastest Cache

August 24th, 2020 by LSCache 7 Comments

It can be difficult to choose a cache plugin for your WordPress site, when they all have so many features. Hopefully today we can make that task somewhat easier for you by comparing the capabilities of two popular plugins, each with over a million active installations: LiteSpeed Cache vs. WP Fastest Cache.

LiteSpeed Cache vs. WP Fastest Cache

Let’s start by discussing each plugin’s caching capabilities, ecommerce compatibility, optimization, online services, and costs.

Caching

There are many types of caching that can be done with WordPress, but when you talk about WP cache plugins, you are generally referring to “full page cache.” Page caching is essential for improving the performance of WordPress sites, as it allows static snapshots to be generated and saved for the dynamically-generated page. It is significantly faster to serve a snapshot than it is to wait for WordPress and PHP to assemble content dynamically. In most cases, a WP page is exactly the same every time it is requested, and so it makes sense to serve saved content rather than going through the expensive process of building the page. Visitors to a cached page are given a much-improved user experience than those who visit an uncached page.

How Caching Works

In the simplest of cases, a single cache object can be generated for each page on the site, and this saved content can be delivered to every visitor. It gets more complicated when you factor in pages with private content, or customization based on things like the visitor’s location or type of device used to access the site (but we’ll discuss those scenarios further down the page).

WP Fastest Cache

WP Fastest Cache makes use of rewrite rules in a site’s .htaccess file to completely bypass PHP and serve static HTML. This is the recommended way to cache a WP site. It is preferred to avoid PHP because of its expensive overhead.

LiteSpeed Cache

LSCache also uses a site’s .htaccess file to define caching behavior, though there is one important difference: the plugin itself does not actually do any caching. Basic LSCache functions are carried out by LiteSpeed Web Server’s built-in cache module. The plugin is provided as an easy way for WordPress to communicate with the cache engine, but it doesn’t execute any of the caching tasks, and the cache files themselves are not stored within the WordPress file structure.

Purging Cache on Demand

Both WPFC and LSCWP expect you to define an expiration time or TTL (Time to Live) for content. This is the amount of time for which cached content is considered fresh. Sometimes, though, content must be purged from the cache before it reaches its natural expiration.

WP Fastest Cache

If a post is modified or a comment is posted, the static HTML copy of the post page is automatically deleted. Admin users have the choice of configuring the plugin to additionally clear all cached content, or clear just the home page, post categories, post tags, and post pagination.

It is also possible to purge the entire cache or just a single page on demand.

LiteSpeed Cache

LSCWP also purges the static HTML copy of any post that has been modified, but it uses its server connection to implement a tag-based system. This system identifies related content that must also be purged. In this way, there is never too much or too little removed from the cache.

It is also possible to manually purge the entire cache or a single page, if desired.

Handling Expired and Purged Cache

No matter which plugin you use, there will be a cache directory on your server that continually fills up and takes up space. Let’s look at how each of the plugins cleans up after itself.

WP Fastest Cache

With WP Fastest Cache, the expired or purged content in the cache folder is copied to a temp directory and deleted later, in order to avoid taxing the system.

LiteSpeed

LiteSpeed’s garbage collection works at the server level. Because tags are tracked and stored in shared memory, the server has an efficient way of determining when a page needs to be deleted from cache. When the LiteSpeed server receives the purge header, it simply marks the related tags as “purged” but does not actually delete the files on the file system. This is to avoid heavy disk I/O while serving the response.

LiteSpeed Server will deal with the outdated entries during non-busy CPU cycles and delete files in small batches with minimum side effects.

Cache Varies

Both plugins allow multiple public cache versions of a single page, for certain situations. This is referred to as a “cache vary.”

WP Fastest Cache

The only cache vary implemented by WPFC is one for device type, and it is only available for premium users. WPFC Premium will store a separate mobile view if necessary.

The basic version of WPFC caches a single copy of the page that must be shared between desktop and mobile viewers. If the mobile view is significantly different than the desktop version, you can configure the plugin to serve uncached content to mobile viewers.

Logged-in and non-logged-in users share a single cached copy of the page. If there is personalized content for logged-in users, then you can configure the plugin to serve uncached content to logged-in users.

LiteSpeed

LSCache can save multiple cache files per page. and they may be based on any number of things, from device type (mobile vs. desktop), currency, and geolocation, to the values stored in cookies on the user’s device.

Additionally, LSCache can distinguish between public cache and private cache, which means logged-in users may see cached pages with their own personalized content. For sites where the content differs by user role (as opposed to individual user), cache varies may be used to store different versions of public cache for each user role.

Cache Preloading and Rebuilding

WP Super Cache and LiteSpeed Cache both have some version of a cache crawler, whose job it is to find uncached pages and store them. This minimizes the possibility of a visitor having to wait for any pages to be dynamically assembled.

WP Fastest Cache

For WPFC, the preload process starts to work when the cache is cleared, and then stops once it has traversed the site. BY default, the preload process runs every 5 minutes, but you can customize this by running a manual preload with a cron job.

Alternatively, you can configure preload to restart immediately after completing, so that there is always a process running, looking for uncached content, and caching it.

LiteSpeed

LiteSpeed Cache’s crawler simulates a non-logged-in desktop user visit by default, just like WPFC, but may be configured to crawl as a mobile user as well. Additionally, for sites that employ user-group-based cache varies (i.e. retail customers vs. wholesale customers), or cookie-based varies (i.e. visitors with an affiliate cookie), the cache may be crawled simulating a logged-in user from any particular user group, or a user with a particular cookie. If you have the resources available, you could theoretically have dozens of crawlers going at once, simulating all sorts of user interactions.

LSCWP’s crawler configuration allows you to choose frequency, duration, and a number of other settings to allow the crawl to have minimal server impact.

Compression

Both plugins cache and serve compressed content. WPFC supports gzip compression, while LiteSpeed supports both gzip and brotli.

eCommerce

When you run an online shop, there are necessarily going to be pages (and sections of pages) that can’t be stored in the public cache. Shopping cart pages and last-viewed product widgets, are good examples of this.

Handling Private Content with WP FastestCache

WPFC deals with the problem of personalized content by excluding it from the cache. WooCommerce Cart, My Account, and Checkout pages are automatically detected and excluded from caching. Other eCommerce solutions would need to have their pages manually excluded from caching.

Handling Private Content with LiteSpeed

LSCWP allows you to cache WooCommerce and other pages that contain both public and private content. With ESI (Edge Side Includes), holes are punched on a public page, and are filled with shopping cart data and other private content. Then, the mixed-content page can be served to the shopper, fully cached.

This hole-punching behavior is built into LSCache and is automated for WooCommerce, and some other popular plugins. Conveniently, ESI can be configured by site admins for use with any widget or one-part shortcode. LiteSpeed also can turn nonces into ESI blocks, allowing them to expire sooner than the pages they are on. This is especially useful with contact forums, but has other applications as well.

Developers may choose to have their plugins support ESI natively through the LiteSpeed API.

Optimization

If you use site evaluation tools, like Google’s PageSpeed Insights, or GTmetrix, you’ll want a nice selection of optimization features in order to implement the tool’s suggested site improvements.

Both WPFC and LScache offer many optimization tools, including CDN support, database optimization, minification and combination of JavaScript and CSS, HTTP/2 push, lazy load, and a variety of other popular optimization features, as shown in the table below.

Note that WP Fastest Cache provides some of these features only under the Premium plan.

Online Services

WP Fastest Cache offers image optimization in its premium version, and requires payment through a credit system, one credit per image.

LiteSpeed Cache offers Image Optimization, Critical CSS Generation (CCSS), and Low Quality Image Placeholder Generation (LQIP). All services have a free tier, but require payment for heavier use. LiteSpeed performs these services remotely on QUIC.cloud servers so as not to put any extra load on yours.

Cost

WP Super Cache has a free version, and a premium version that, as of this writing, costs a one-time fee of $49.99 for one license, up to $175.00 for five licenses.

The LiteSpeed Cache plugin is also free, however a LiteSpeed web server is required in order to use the server-side cache, and there may be costs there, depending on your needs. There is a free, open source version (OpenLiteSpeed), or you can get an Enterprise license. License pricing ranges from Free for single site owners, to $96/month for large hosting companies, with several levels in between. QUIC.cloud is a new option. It’s a CDN that allows you to use all of the LSCache plugin features regardless of which server you are running on. The CDN comes with a free tier, but requires payment for heavier use.

Feature Comparison

Take a look at a side-by-side comparison of plugin features:

FeatureLiteSpeed CacheWP Fastest Cache*
Cache Features
Full-Page Cache
Tag-Based “Smart Purge”X
Tight Integration With ServerX
Private CacheX
Edge Side Includes (ESI)X
Widget Cache✓ (Covered under ESI)$
Crawler✓ (Preload)
WordPress Multi-Site Support
Cache Logged-in Users
Cache Separate Mobile View$
Cache Vary on User GroupX
Cache Vary on Geographic Location, Currency, etcX
Cache REST APIX
Purge Selected URLs on a Schedule
Browser Cache Support
Other Optimization Features
Content Delivery Networks (CDNs)
Database Optimization$
CSS Minify
CSS Combine
CSS HTTP/2 PushX
Critical CSS GenerationX
JavaScript Minify
JavaScript Combine
JavaScript HTTP/2 PushX
Load CSS AsynchronouslyX
Load JavaScript Deferred$
HTML Minify
Exclude Selected URI’s from Optimization
Remove Query StringsX
Remove Google FontsX
Lazy Load Images$
Lazy Load iframes$
Responsive PlaceholdersX
Wildcard Usage in CDN SupportX
Image Optimization$
WebP Generation$
Plugin CostFREEFREE and PAID versions
Support CostFREEFREE

* WP Fastest Cache feature list is based on what we found listed publicly on the WP Fastest Cache website
** Some features require a Licensed copy of a LiteSpeed Web Server with Cache Module

Conclusion

Both LiteSpeed Cache for WordPress and WP Fastest Cache are strong contenders, but LiteSpeed is a clear winner when it comes to the ability to cache more scenarios (eCommerce, logged-in users, situations requiring cache varies, etc.).

If you’d like to try LiteSpeed Cache, drop by our website to learn how to get started!


Categories:LSCache

Related Posts


Comments