Support » Plugin: WP-PostViews » [Plugin: WP-PostViews] WP Post Views With W3 Total Cache ?

  • Hi,
    Im using W3 Total Cache and the current latest version of Wp post views.
    But after installing the W3 total cache the wp post views plugin not working correctly.

    Sometimes its decreasing the post views too.
    for example :
    initial ‘views’ value : 220
    for the next visitor : 221
    for the next visitor : 222
    for the next visitor : 219
    for the next visitor : 218
    for the next visitor : 220
    for the next visitor : 221
    etc !

    I tried to modify the AJAX Jquery calls too.. but they are already correct.

    Can someone help me with this please ?

    in w3totalcache I’ve enabled (page cache,database,object cache too)

    I really like and need the post views plug-in because on my site the contents are ordered by post views (Most viewed,etc)
    Thank you.

Viewing 15 replies - 1 through 15 (of 37 total)
  • Database caching is enabled in W3TC?

    Thanks for the repy.
    Yes, all database,page,object,minify caching are enabled.

    My site is : Ezzal Games

    I am tried to use the Wp-Postviews javascript call.
    example script in head:
    script type=”text/javascript”>jQuery.ajax({type:’GET’,url:’’,data:’postviews_id=xxxxx’,cache:false});</script>

    (which will call the PHP page using ajax method to update post views, but that is also having same problem)

    I have lot of files and some times heavy visitors on the site too..
    So disabling database caching may increase server load, right ?

    Can you recommend me any ways ? Is this possible to exclude that plugin queries from database caching ?

    Thank you for your time.

    Are you using the development version?

    Yes. I use the Beta version.

    If you enable the debug mode you should be able to find the queries post views is using and add the table or some other unique “stem” to the ignored query stems field on the database cache settings tab.

    Ah,ok. Thanks for the help.

    You’re welcome.

    @ezzal, did you get it working? I added “meta_key = ‘views'” to the “Ignored query stems”, but it’s still not working (that’s about the most unique thing from the query I could find).

    In another topic I read you had to set ‘disk (enhanced)’ to ‘disk (basic)’, but that didn’t work either..

    If your poll program uses AJAX and you’re not caching database queries related to it, page caching should have no effect. If someone is doing something else, they need to explain it or I can’t help.

    WP Postviews is not a poll plugin, it counts the views of your posts. And ofcourse it won’t work if caching is 100% (iow: for everything) enabled, since that would mean not all views are counted.

    The funny thing is that the plugin doesn’t count views at all since I activated W3 Total Cache, when you would expect it to count at least a few (when the page cache is getting build).

    So, I tried the solution that’s mentioned in the other topic, but that doesn’t work.
    I also tried disabling the cache for that specific query by adding “meta_key = ‘views'” to the ignored stems, but that doesn’t work either.

    I also had the same problem with my site Ezzal – Free Online Games but I got it working now.
    In the latest version of W3TC, I tried to add this code in the very top of the plugin (wp-postviews/wp-postviews.php) file. and it seems to be working so far.

    define(‘DONOTCACHEPAGE’, true);
    define(‘DONOTCACHEDB’, true);
    define(‘DONOTCACHCEOBJECT’, true);

    Thank you.

    Thanks @ezzal.

    Hmm.. I added that to the wp-postviews.php (emptied cache after that), but it still isn’t working..

    Could these settings be the problem?

    mod_mime: Not detected
    mod_expires: Not detected
    mod_deflate / mod_gzip: Not detected
    mod_headers: Not detected
    mod_env: Not detected
    mod_setenvif: Not detected
    mod_rewrite: Not detected

    Hmm.. asked the hosting provider and the settings I mentioned in my last reply are set/enabled.

Viewing 15 replies - 1 through 15 (of 37 total)
  • The topic ‘[Plugin: WP-PostViews] WP Post Views With W3 Total Cache ?’ is closed to new replies.