• I am developing a plugin that adds counters to every post. Now I want this plugin to be fully compatible with cache plugins, and in order to that I have to know how it works.

    Will w3 just cache the whole page and whole list of search results as they are, with counters and all in tact. If so, then the counters will not be up to date when they change.

    Now I can make my implementation 2 ways:

    Option 1
    Just load the counters on every page from the database. The html output will be different for every page.

    Option 2
    Add a dash of ajax to the plugin. Have all the pages load the same without any counters, and in the end just get he counters via ajax, and asynchrnous update the counters. Pages are now all the same.

    Hope someone have some tips for me. Cheers.

    http://wordpress.org/extend/plugins/w3-total-cache/

Viewing 2 replies - 1 through 2 (of 2 total)
  • It is correct that the pages will remain the same until something change. However the cache gets purged when someone posts comments etc. You can also call the various purge cache functions in your code. flush_pgcache() //page cache
    flush_dbcache() // database cache
    flush_minify() // minify cache
    flush_all() //all caches

    Total Cache has support for fragmented caching but it requires modifying theme files. You could also use JavaScript its probably simpler.

    Plugin Contributor Frederick Townes

    (@fredericktownes)

    It depends on how your counter works and is implemented. The best counters use a 3rd party service to track traffic and then display it on your web site that way (those are also more accurate and allow your web site to scale).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: W3 Total Cache] Will this plugin break post counters’ is closed to new replies.