How Litespeed Cache Works to Improve Website Loading Speed
by Dave Reeder , 19 September 2019
What is Litespeed Cache and how does it work?
Litespeed Cache (LS Cache) is a server-side caching plugin that works on Litespeed web server. It works by creating snapshots of your page when that page is first visited and then serving the snapshot to the next visitor:
This means the second time the page is loaded, it will be much faster because the snapshot doesn't need to run all the PHP functions and database calls that the non-cached page runs when it loads. The snapshot produced by Litespeed Cache is very lightweight, so the server response time is massively reduced.
Below are screenshots of Firefox's developer tools showing the same page loading with and without Litespeed cache:
In the top screenshot, we can see the server is spending over a second compiling all the resources, making database calls etc. This is the server response time. But in the second screenshot, it is serving a snapshot via Litespeed cache, meaning the server response time is less than 0.2 seconds!
On some pages, I have seen this down to around 30-40ms, which is 0.03-0.04s!
The page looks the same either way and all the functionality is the same, but to the user the site is clearly much faster to load.
Because the server response time is reduced, the website loads faster. Also, it puts less load on the server so can potentially reduce hosting costs.
What do I need to use Litespeed Cache?
To run Litespeed Cache, you need a server running the Litespeed web server software. On shared hosting this probably won't be available, so you would need to invest in a VPS or dedicated server.
That's Expensive! What's the Alternative?
The alternative is to host your website with us! We already have Litespeed sever and cache set up on our High Performance hosting packages from as little as £20.83 per month! Contact us for more information.
Join the Discussion...