Ebcosio / CLT_News

0 stars 0 forks source link

OLC BuddyPress integration #12

Open john-hix opened 3 years ago

john-hix commented 3 years ago

Eric suggested pulling the data found on the activity page. That data is available at /wp-json/buddypress/v1/activity. (OLC)

Traffic for OLC is rather low. Using the raw activity feed would be sufficient for a while. Later, the need could arise for fetching only "hot" or popular threads.

john-hix commented 3 years ago

@Ebcosio , I think the OLC activity data feed lends itself to caching better than the events data, which needed to be kept up-to-date (or at least kept only in page cache).

As such, I think we could cache the activity feed in a transient. That could be very fast if CLT decided to use in-memory caches for their WP sites. Even if they don't, it would still be faster than calling OLC every time.

I think we could make the cached OLC data expire every 6 hours or so. Overall, what do you think about caching the OLC data?

Ebcosio commented 3 years ago

Yes, unlike the events data, I think OLC activity is somewhat low and won't need refreshing much. So caching would work here.

john-hix commented 3 years ago