Why You Need LSCache Plugins

LSCache Plugins

Introduction

LiteSpeed Cache plugins are available for a variety of web applications, including WordPress, Joomla!, and Drupal. But do you know why you should cache your apps? Or why a LiteSpeed Cache plugin is uniquely capable of delivering your web content quickly and accurately?

Let’s talk about all of that, and then look at a quick and easy way to see if your website supports LiteSpeed Cache.

Prefer to see this topic in video form? Click here.

Why Cache Your Web App?

Let’s start with a basic explanation of what a cache is. Generally speaking, a cache is a way of storing data so that it is easier or faster to retrieve than the original source.

With many web applications, caches are particularly helpful. The dynamic pages generated by these apps don’t exist anywhere in the file system. They are built on demand with PHP or some other method. So even though the web app’s pages are served to the visitor as HTML, generating them can be resource-intensive. And slow.

This is where LiteSpeed Cache comes in. LiteSpeed takes the dynamically generated web page, and stores it as a static HTML snapshot. That way, the next time the page is requested by a visitor, the snapshot can be served immediately. Serving a snapshot is much faster and uses far fewer resources than generating the page dynamically does.

Why Use a LiteSpeed Plugin?

If you know a little something about .htaccess files, and how to use rewrite rules, you can control the LiteSpeed Cache Engine that way. All it takes is a few rewrite rules in your application’s document root .htaccess, and you can have a simple page cache.

So what do you gain by using an LSCache plugin? Quit a lot actually.

An LSCache plugin bridges the knowledge gap between a web app and the Cache Engine.

Let’s put it another way: web applications have rules about what content you can cache, and when that cache should expire or be purged. An LSCache plugin understands these rules, and instructs the server Cache Engine how to proceed. This communication is not something that you can duplicate with rewrite rules.

For example, let’s say you have a WordPress site. The LSCache plugin for WordPress knows that when a post is edited, saved, or deleted, that post must then be purged from the cache. But it goes even further than that.

The LiteSpeed Cache engine is equipped with a handy tagging system that allows cached pages to be grouped together and purged all at the same time. This purge tag functionality is very powerful. It means that LSCache can do a targeted purge, removing the edited page, as well as every other page that is influenced by it. Without a tagging system, other plugins may either purge too little (just the single page) or too much (all of the site’s pages).

So, returning to our WordPress example, when the plugin knows to purge an edited post from the cache, it also knows to purge everything else that shares the same purge tags as that post. That can include the category pages for the post’s categories, monthly archives for the post’s publication date, author archives for the post’s author, and more.

Other benefits of LiteSpeed Cache plugins include:

  • the ability to cache both logged in and guest users
  • ESI technology for punching holes of private content on publicly cached pages
  • support for caching multiple views of a single URL with cache varies
  • and much more

LSCache plugins are available for many popular web apps, and you can get a list of them at lscache.io.

If there is no plugin for your favorite web app, and you’ve got developer skills, why not try writing one? Check out our documentation for all of the details.

Check Your Site for LiteSpeed Support

There’s a simple way to see if your site supports LiteSpeed Cache, and if caching is active: the LSCache Check Tool.

Visit check.lscache.io and enter your website’s URL. The tool will respond with an easy-to-read Yes or No result. Plus, it will display the URL’s response headers, in case you want to examine the results more closely.

In addition to LSCache support, the tool can detect cache hits, and can detect when sites are using LiteSpeed Web ADC or QUIC.cloud CDN for caching.

Additionally, a Stale Cache Warning will alert you if browser cache is detected on dynamic pages. This is because browser cache may interfere with the delivery of fresh content.

If your site doesn’t have LiteSpeed Cache support, you can change that! Here are a few ways:

Conclusion

Now that you know what LiteSpeed Cache can do for your web applications, we hope you’ll give it a try!


Tags:
Categories:Featured Posts , LSCache

Related Posts


Comments