What is LiteSpeed LScache?


Ask A Question

What is LiteSpeed LScache? For those who don't know what a cache actually is, let's deal with it first. This basic knowledge is essential for understanding LScache.

Basically, the term cache is already ancient and has been around almost since the first day of computers and software. In order to understand what a cache is and what it is good for, an example from the analogue world is best. A cache behaves more or less like a secretary, i.e. a kind of helper that can relieve you of a lot of work. If you are a clerk in an office, you often have to fetch data from the archive for every task, for example. In a figurative sense, this archive would be a database, which is not stored on the hard drive, but the archive is located in another room. If you don't have a secretary, you have to fetch the required data from the archive every time, which inevitably takes time. In addition, you not only have to get this data from the archive, you also have to process this data first in order to be able to do something with the result of the processing. The annoying thing is that you have to do this process over and over again, no matter if you just pulled the data from the archive a few minutes ago. Even in the analog world, one would never practice such a way of working without a computer because it is extremely inefficient. But that's the way it is in the digital world, at least if you don't have a cache or secretary.

But if you have a secretary, he does exactly what is not only logical, but also saves a lot of time. A secretary stores (caches) data for a limited time so that the data does not have to be retrieved from the archive the next time. In addition, it also stores the result of the processed data. Inevitably, this saves a considerable amount of time. Transferred to the Internet, calling up a website does not take 4 seconds or even longer, but often in just a few milliseconds.

If so much time is saved by using a secretary or a cache, the question inevitably arises as to why the cache is not generally available? That's a legitimate question, but it's not quite that simple.

The problem is not the data, but the processed data, or the result of the processing. If a page is accessed from the Internet, no static file is loaded from a server. This does not apply to static files such as images, CSS or Javascript. So that you can see something in the browser, all the necessary data must first be generated dynamically on the server, and this requires several processes. In itself, the processing would not be the biggest problem. The biggest problem is the personalization of the requested data, so that the server only delivers the requested data to a single, very specific user. This is particularly critical for online shopping, online banking or any type of login. So that the server can ensure that it always sends the right data to the right user, it generates a session and sometimes saves a lot of information in it, but only temporarily. If you close the browser or are inactive for several minutes, this volatile data is deleted from the server and the session is over. In the case of a login, you would be logged out or the shopping cart in an online shop would be empty. If you now transfer the functionality with this volatile data and the session to the secretary, then he could still store data from the archive (cache), but he lacks the ability to store the volatile data from the session. You could therefore only use the secretary where you do not need a session. Modern content management systems, but especially shop software, cannot do without a session and are therefore absolutely necessary.

However, this does not rule out the general use of a secretary or a cache, since not all caches are the same. In the case of the LScache, on the other hand, it is.

Why? In a way, LScache is the cache of all cache types, although a similar functionality is also available from other providers. However, these are far less flexible and have numerous limitations, which means that they can only be compared to LScache to a limited extent.

The LScache is a page cache or also called HTTP cache. The fundamental special feature of a page cache is that it saves the dynamically generated data, which otherwise has to be generated each time a page is called, in a static file on the server. This process is comparable to the browser function with which you can save a page you have called up locally on your own computer. However, the LScache is a server-side cache. Therefore, he does not save the data locally on your computer, but on the server. Calling up this stored file is inevitably much faster and essentially explains why a page cache lets a website load so much faster. If this is happening so quickly, the question arises as to why it is not generally handled in this way?

Once again, it's not that easy here either, but more on that later. The inherent nature of a static file is that it lacks any dynamics. Accordingly, there are no longer any functions in a static file that could create something dynamically. Let alone it is possible to generate a session in which you could save volatile data. Logically, you could not use a page cache like the LScache for online shops, online banking and similar sites where a session is needed. Not only would it be so, it is so, but with the exception of the LScache. Conventional page caches can only be used on critical pages for areas that do not require a session. In the case of an online shop, adding an item to the shopping cart is the end of the process. However, the emphasis is on at the latest because there are numerous other situations before that which preclude the use of a conventional page cache. The reason for this lies in the way a page cache works. A page cache is tied to the accessed URL. A separate cache copy is created for each URL and thus a separate static cache file is stored on the server and is therefore unchangeable. In order to change the cache of a URL, it must first be purged in order to then create a single cache copy at a time. Not so with the LScache.

So now we know what a cache or a page cache is. We now also know why a page cache can increase the loading time of a website exorbitantly. But we also know that you can't use a page cache everywhere. Why this is not the case for the LScache and why it can be used almost limitlessly must remain unanswered at first, because each of the special features is a separate topic. Therefore, read the other articles on what is Cache Vary and what is ESI.

LiteSpeed LScache Benchmarks

LiteSpeed LScache Benchmarks
LiteSpeed LScache Benchmarks
LiteSpeed LScache Benchmarks
LiteSpeed LScache Benchmarks
LiteSpeed LScache Benchmarks

More LiteSpeed related Topics