Notifications
Clear all

wpForo 1.x.x [Closed] wpForo statistics Online number doesn't update with Redis object cache

5 Posts
2 Users
0 Likes
882 Views
Posts: 13
Topic starter
(@cookingwithdog)
Eminent Member
Joined: 4 years ago

Hello,

With Redis object cache, wpForo statistics (Online user number) doesn't update.

When excluding transient and site-transient from the object cache, the online user number starts updating.

Is the wpForo statistics data stored in transient? If so, maybe you want to avoid storing the statistics data in the transient.

I found this article about cache in transient and you might want to check it out.

https://pressjitsu.com/blog/transient-cache-alternatives/

Do you have any thoughts about this?

Thank you.

4 Replies
Posts: 13
Topic starter
(@cookingwithdog)
Eminent Member
Joined: 4 years ago

Is there any cache group name for wpForo statistics data? If I can get the name, I might be able to exclude it from the object cache. Any advice is helpful. Thank you.

3 Replies
Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10503

@cookingwithdog,

First, I'd ask you exclude wpForo forum page from your cache plugin. Here is good information about that: https://wpforo.com/community/faq/wpforo-and-cache-plugins/

wpForo statistic information is not a real-time changing info. It's cached by wpForo as 'wpforo_stat' option in wp_options table. The cached stat object generation is not a light process, so we cannot enable it on each page reloading. This will affect the page loading speed. That's why it's cached by wpForo. But this cache is dynamic. wpForo updates all stats once a new user is registered or new topic/post is added. There are lots of actions which trigger forum statistic updates. This works fine unless you use other cache solutions on forum page. So you should exclude the forum page from other caching plugins.

(@cookingwithdog)
Joined: 4 years ago

Eminent Member
Posts: 13

@robert

Thank you for your reply.

Both page cache and Varnish cache for the forum page are already excluded. The link you provided is about page cache.

I use Redis Object Cache, and I can only exclude cache groups.

Please check this topic about the object cache.
https://wordpress.org/support/topic/how-to-exclude-the-homepage-from-being-cached/

The object cache configuration page explains how to exclude cache group.

> WP_REDIS_IGNORED_GROUPS (default: ['counts', 'plugins'])
> Set the cache groups that should not be cached in Redis.
https://github.com/rhubarbgroup/redis-cache/wiki/Configuration-Options

I am new to this object cache and still testing but I found that the number of online users updates when cache groups "transient and site-transient" are excluded.

What I learned so far is a transient stored in wp_options is cached by Redis object cache, and the cached data will not change until the object cache expires.

If the cache duration is set to 12 hours, the number of online users probably will not change for 12 hours.

This is not an urgent matter but many people start using Redis so other wpForo users might be interested in this topic.

Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10503

@cookingwithdog,

Thank you for the details. But it's hard to keep compatible object based caches. It's better to find a way and exclude the 'wpforo_stat' option caching from this plugin, they may have an option for this or you can ask them to add one.