Hello my dears
How can I add ++1 to node's visit counter after request a page and before read the node's cache file?
the node' counter don't work properly after enable and use filecache! :(
best regards

Comments

rwohleb’s picture

Assigned: khaleghian » Unassigned

This is a problem with ALL cacheing modules and external caches such as Varnish. You should take a look at the Better Statistics module (https://drupal.org/project/better_statistics) since it allows view counting via AJAX. However, the count on each page will still be stale during the lifetime of the cache. For example, if your cache time is 5 minutes, the count will only be out of date for 5 minutes, but the number will be correct once refreshed since it was continually collected.

If you really need the count to be fresh on every page load, you could write a custom module that serves the count via AJAX. Check the issue queue for Better Statistics to see if someone has already written one.

rwohleb’s picture

Issue summary: View changes

Correction syntax

ogi’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)