Merged

This page was merged into handling logged in cookie conflicts

Managing Multiple LSCache Plugins in a single Virtual Host

It is possible to have multiple cache plugins in a single virtual host. However, to avoid any conflicts between them, it is recommended to set a few configuration options available in the plugins.

This wiki entry is intended for people who have multiple LSCache plugins in the same document root. This includes two of the same web application (e.g. two WordPress installs in the same document root). For these situations, some extra steps may be required to correctly cache the web applications. If this does not describe the situation, then there is likely no extra steps involved.

By default, the cache will use _lscache_vary as the login cookie in all the web applications. This causes an issue, because a user could be logged in to one web application and not the other. Once the user visits the non-logged in application, a cache entry will be created for the page with the login cookie. Since both applications recognize the same cookie, logged in users visiting that page will be served from cache. This issue can be resolved by modifying at least one of the web applications.

In WordPress

The login cookie can be modified in the WP-Admin panel. The relevant option is in LiteSpeed Cache → Settings → Advanced, as depicted below:

In XenForo

The XenForo plugin will not modify the rewrite rules directly. The setting in XenForo is in the admin panel under Home → LiteSpeed Cache → Settings, as depicted below:

After saving, a notification will appear. The notification will instruct you further on what to add to the rewrite rules, like so:

After adding the rules, it can be verified in the LiteSpeed Cache Management screen:

If the changes are correct, it will output the following:

The Cache Tag Prefix should be used in situations where multiple of the same web application is installed in the same virtual host (e.g. a WordPress in /public_html/shop/ and another WordPress in /public_html/). Using different cache tag prefixes will prevent possibly purging too many pages.

In WordPress

The cache tag prefix can be modified in the WP-Admin panel. The relevant option is in LiteSpeed Cache → Settings → Advanced, as depicted below:

In XenForo

The cache tag prefix can be modified in the Xenforo Admin. The setting in XenForo is in the admin panel under Home → LiteSpeed Cache → Settings, as depicted below:

  • Admin
  • Last modified: 2017/02/22 19:21
  • by Kevin Fwu