[Solved] Views counter not updating with cache enabled
I feel compelled to ask about this. With object cache enabled, forum views will never update unless you update the thread by commenting on a post. So if you lock a thread, for example, views will never again increase. This, of course, looks very bad and gives a false image of your forum as being less active than it is.
I understand that, by deactivating object cache, views will update on the fly whenever someone visits the thread - just like it works on all other forums (phpbb, invisionboard, etc). For most of us, anything that has the word cache on it automatically becomes very important to us so we feel the need to activate it. But, as a consequence, it breaks the views function.
So my question is. What is the difference between, let's say phpbb and wpforo in terms of cache? Why doesn't phpbb or any other forum software need object cache and wpforo does? Is it because Wordpress by default is much slower?
Just looking to understand the situation and whether I need object cache or not. Both cache and correct stats are important to me, Thank you.
It does register the views and the counting is being done in the database, but it doesn't update the numbers on the topic list in real-time, it'll show the new number once some action is done, so it'll be updated automatically, you don't need to reset cache every time. Please keep enable the wpForo Object Cache and let it updating whenever the cache is reset to make the forum light and fast. Counting of each topic views on every page load is not a good idea, and it affects the performance.
Hi Robert and thank you for replying.
I do understand how it works but even though the info is saved in the database, the info displayed to the visitor is not correct. I have a thread right now that gets loads of visits. But unless someone comments, the viewer count does not update. So it went from 1000 views to 1400 views when someone commented. It's quite a jump.
What I am curious about is, how does phpbb or invisionboard handle it? Their views are updated on the fly and from my experience, there is no object cache needed there? Why cannot wpforo do it like they do? This is not meant as any criticism, I'm just curious. Is it because Wordpress is a slow platform or?
I appreciate that answer. Thank you for explaining to me 🙂
Edit: I just tested a competitors forum (invisionboard) and it wasn't all that fast tbh. My wpforo was much faster.