WordPress.org

Ready to get started?Download WordPress

Forums

Top 10 - Popular posts plugin for WordPress
how to disable the daily stats? (7 posts)

  1. postoffice33
    Member
    Posted 1 year ago #

    hi, if I am just interested in the global stats how to disable the daily stats in order to avoid the DB (select/insert/update) overheads?

    http://wordpress.org/extend/plugins/top-10/

  2. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    There isn't an easy way to do it. You will need to modify top-10-addcount.php.js to comment out or delete line 29,34,35

    https://plugins.trac.wordpress.org/browser/top-10/trunk/top-10-addcount.js.php

  3. postoffice33
    Member
    Posted 1 year ago #

    Hi, thanks for your reply. In fact analyzing your code I was thinking something like that.

    May be in the next version you can add a boolean option (daily yes/no) and simply change the 3 lines you mentioned with an 'if(daily_enabled) ...., right?

    I mean in a lot of cases you don't need daily stats and you can avoid the overhead (including the periodical maintenance of mysql tables - even I see is just a simple 'truncate').

  4. postoffice33
    Member
    Posted 1 year ago #

    I forgot to ask you one thing: I see the kind of AJAX request you do is like

    http://best5.it/b5/wp-content/plugins/top-10/top-10-addcount.js.php?top_ten_id=344

    what about browser cache? Should you add a parameter with a timestamp (that is always different) to force the browser doing the request to the server? Something like:

    http://best5.it/b5/wp-content/plugins/top-10/top-10-addcount.js.php?top_ten_id=344&top10_timestamp=<random_value_concat_with_timestamp&gt;

    of course server-side you simplu ignore the top10_timestamp url parameter...

  5. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    Agreed on the daily turn off option. I've put it on the list of things to implement.

    I haven't noticed any problems with browser cache till date on this. If you refresh the page the hit will be tracked.

    Am still trying to find a better implementation of the AJAX request. It's the biggest issue currently in terms of performance.

  6. postoffice33
    Member
    Posted 1 year ago #

    Hi,

    I posted a new topic with the AJAX solution. May be you can incorporate the same in your plugin new version.

    The solution is also taking care of compatibility with W3 Total Cache.

    Cheers
    Angelo

  7. postoffice33
    Member
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.