What is database caching?

Whenever your website needs to load a page, it usually queries the database to fetch posts, settings, or user information. That’s fast—but not always fast enough. If the same queries are repeated over and over, performance suffers.

That’s where database caching comes in. By storing the results of frequent queries in memory, your site can skip the database round-trip and deliver the content instantly. We use Redis, a high-performance in-memory data store, because it’s proven to handle heavy workloads with lightning speed.

How to enable it

To take advantage of per-user Redis caching, you’ll need to make sure the LSCache plugin is active on your site. From there, simply grab the UNIX socket path provided in your control panel and drop it into your configuration, here is how to do it

Locate Redis on the Database section on your hosting control panel and open it

Now copy the folder inside () without those parenthesis, in this case it should be: /home/bigframedigital/.redis/redis.sock
This folder will change according to the username assigned in your account, this is just an example.

Now go into the Litespeed Cache plugin -> Cache -> Object
Enable Redis and paste the folder that you just copied from the control panel, hit save. If connection Test says “Passed” Redis has been enabled on your website.

You can add all your websites to your private Redis Caching, since they all have different database ids, they won’t conflict between each other they will all enjoy your private database caching.

 

 

Cette réponse était-elle pertinente? 0 Utilisateurs l'ont trouvée utile (0 Votes)

Powered by WHMCompleteSolution