Title: Compatibility with LiteSpeed Cache
Last modified: August 31, 2016

---

# Compatibility with LiteSpeed Cache

 *  Resolved [lsfoo](https://wordpress.org/support/users/lsfoo/)
 * (@lsfoo)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/compatibility-with-litespeed-cache/)
 * Hi there,
 * I am currently working on getting [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
   to work with this plugin. As it is, the post view counter will increment as expected,
   however, the display will not update accordingly.
 * After poking around a bit, I was able to get it working.
    First, I needed to 
   change the code added to templates per your installation instructions (instead
   of ‘<?php if(function_exists…’, I used a div ‘<div id=”pageviews_lscwp”> </div
   >’)
 * Second, I needed to change your ajax request to output the results to the div,
   adding
    success:function(data) { if(data) { jQuery(‘#pageviews_lscwp’).html(data
   +’ views’); } }
 * Now for my questions:
    1. Is there any possibility of this not working from a
   WP_PostViews point of view? 2. If so, could you please provide an explanation
   as to why not? 3. If not, I intend on providing instructions in the LiteSpeed
   Cache settings on how to get it to work. Do you have a standard way of detecting
   whether or not the WP-PostViews plugin is installed and active? 4. May I add 
   a section somewhere in your documentation to provide instructions for compatibility
   with LiteSpeed Cache?
 * Thanks,
    Kevin
 * [https://wordpress.org/plugins/wp-postviews/](https://wordpress.org/plugins/wp-postviews/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * (@gamerz)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/compatibility-with-litespeed-cache/#post-7129819)
 * 1. Only the view display is not being updated, but the views are still being 
   counted.
    2. It is an old plugin and was not designed to work with caching at
   the start. 3. Check to see if `the_views` function exist? 5. Sure. Under FAQ 
   most prob. Submit a PR [https://github.com/lesterchan/wp-postviews](https://github.com/lesterchan/wp-postviews)

Viewing 1 replies (of 1 total)

The topic ‘Compatibility with LiteSpeed Cache’ is closed to new replies.

 * ![](https://ps.w.org/wp-postviews/assets/icon.svg?rev=978002)
 * [WP-PostViews](https://wordpress.org/plugins/wp-postviews/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-postviews/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-postviews/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-postviews/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-postviews/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-postviews/reviews/)

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)

 * 1 reply
 * 2 participants
 * Last reply from: [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/compatibility-with-litespeed-cache/#post-7129819)
 * Status: resolved