LiteSpeed WordPress Plugin Cache Location Clarification

#1
Currently, we have been using LSCache manually, meaning, we have been using .htaccess rules per. site. This is on shared servers & we have the cache stored in RAM.

Based on the instructions for the WordPress lscache plugin, we need to setup cache directories that are unique to each cPanel user, vs. just having one cache location in RAM.

- why is this? Is it because the purge function within the plugin will purge all cached data, not just the specific user?
- is their a way to store the cache in RAM per. user, as specified by the wiki instructions for user directories.

We would recommend that you provide clear instructions for the WordPress plugin, as it becomes confusing when you reference instructions from the lsmage plugin..

Hopefully you're able to answer our questions above.

Thank You,
Steve
 

mistwang

LiteSpeed Staff
#2
Yes, the purpose of per-user cache directory is for easy cache management, each user can easily purge all cache himself, just in case something went wrong.

Now, if you use relative path for "CacheRoot" like
CacheRoot lscache
The cache directory will be created as "lscache" under user's home directory.

To use per user cache directory in RAM, you need to specify an absolute path, for example
CacheRoot /dev/shm/lscache/user1
be careful not to use the same cache directory for two accounts, it is likely to cause trouble.

Yes, we will update our wiki to make it more clear.
 
#3
What about the, "Storage Path" field that is listed in the litespeed admin dashboard under the "Cache Storage Settings" section. If you have a shared server, do we still enter in a path there, or leave it blank?
 

mistwang

LiteSpeed Staff
#4
Yes, you should set it. it is a server level cache root configuration. if a vhost does not have its own cache root configured, the server level cache root will be used (shared among all vhosts).
If all vhost has it own cache root configured, it does not matter much, but I still recommend to have it configured.
 
#6
Thank you for the clarification & the wiki update.

We have followed the steps required for shared cPanel & WordPress LSCache, but now have the following issue.

When we use the following to store cache in RAM;

<IfModule LiteSpeed>
CacheRoot /dev/shm/lscache/$vh_user
</IfModule>

The sites cache with the WordPress plugin, however, when we purge one site via the plugin, it also purges the other sites cache on the server (different cPanel users)

-------------------------

But, if we use the following to store cache in disk directory of each user;

<IfModule LiteSpeed>
CacheRoot lscache
</IfModule>

The sites cache with the WordPress plugin & when one site purges, it doesn't affect the other sites on the server. In other words, it works correctly.

So, the question is, what are we doing wrong? Appreciate any help that you can provide.
 
#9
Our litespeed setup doesn't have a litespeed virtual host setup in the litespeed dashboard & the real time stats show the VH NAME as;

APVH_domainname.com

Does this help you provide us with more guidance?
 
Top