This is an old revision of the document!


LSCWP Frequently Asked Questions

Is the LiteSpeed Cache Plugin for WordPress free?

Yes, the plugin itself will remain free and open source. That said, a LiteSpeed server is required (see question 2).

What server software is required for this plugin?

A LiteSpeed server is required in order to use this plugin. 1. LiteSPeed Web Server Enterprise with LSCache Module (v5.0.10+) 2. OpenLiteSpeed (v1.4.17+) 3. LiteSpeed WebADC (v2.0+) Any single server or cluster including a LiteSpeed server will work.

Does this plugin work in a clustered environment?

The cache entries are stored at the litespeed server level. The simplest solution is to use LiteSpeed WebADC, as the cache entries will be cached at that level. If using another load balancer, the cache entries will only be stored at the backend nodes, not at the load balancer. The purges will also not be synchronized across the nodes, so this is not recommended.

If a customized solution is required, please contact LiteSpeed Technologies at info@litespeedtech.com

NOTICE: The rewrite rules created by this plugin must be copied to the Load Balancer.

Where are the cached files stored?

The actual cached pages are stored and managed by LiteSpeed Servers. Nothing is stored on the PHP side.

Does LiteSpeed Cache for WordPress work with OpenLiteSpeed?

The support is currently in beta. It should work, but is not fully tested. As well, any settings changes that require modifying the .htaccess file requires a server restart.

Is WooCommerce supported?

In short, yes. However, for some woocommerce themes, the cart may not be updated correctly.

To test the cart:

  1. On a non-logged-in browser, visit and cache a page, then visit and cache a product page.
  2. The first page should be accessible from the product page (e.g. the shop).
  3. Once both pages are confirmed cached, add the product to your cart.
  4. After adding to the cart, visit the first page.
  5. The page should still be cached, and the cart should be up to date.
  6. If that is not the case, please add woocommerce_items_in_cart to the do not cache cookie list.

Some themes like Storefront and Shop Isle are built such that the cart works without the rule. However, other themes like the E-Commerce theme, do not, so please verify the theme used.

My plugin has some pages that are not cacheable. How do I instruct the LiteSpeed Cache Plugin to not cache the page?

As of version 1.0.10, you may simply add define('LSCACHE_NO_CACHE', true); sometime before the shutdown hook, and it should be recognized by the cache. Alternatively, you may use the function LiteSpeed_Cache_Tags::set_noncacheable(); for earlier versions (1.0.7+). If using the function, make sure to check that the class exists prior to using the function. Please visit the API Page for more information.

Are my images optimized?

The cache plugin does not do anything with the images themselves. We recommend you trying an image optimization plugin like ShortPixel to optimize your images. It can reduce your site's images up to 90%.

How do I get WP-PostViews to display an updating view count?

Use

<div id="postviews_lscwp"></div>

to replace

<?php if(function_exists('the_views')) { the_views(); } ?>

NOTE: The id can be changed, but the div id and the ajax function must match.

Replace the ajax query in wp-content/plugins/wp-postviews/postviews-cache.js with

jQuery.ajax({ type:"GET", url:viewsCacheL10n.admin_ajax_url,
     data:"postviews_id="+viewsCacheL10n.post_id+"&action=postviews",
     cache:!1, success:function(data) { 
     if(data) { jQuery('#postviews_lscwp').html(data+' views'); } } });

Purge the cache to use the updated pages.

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