Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#2967 closed enhancement (fixed)

Support Forums: Add caching for user's topics and reviews count

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: Priority: normal
Component: Support Forums Keywords: has-patch dev-feedback


#2772 introduced two functions to get user's topics or reviews count:

  • wporg_support_get_user_topics_count()
  • wporg_support_get_user_reviews_count()

These counts should be cached, and posting a new topic or review should bust the cache.

Attachments (1)

2967.patch (1.9 KB) - added by ketuchetan 7 years ago.

Download all attachments as: .zip

Change History (10)

#1 @SergeyBiryukov
7 years ago

  • Type changed from defect to enhancement

7 years ago

#2 @ketuchetan
7 years ago

  • Keywords has-patch dev-feedback added

Hi @SergeyBiryukov,

I have added my patch. Could you please check and let me know if you have any changes on that.

This ticket was mentioned in Slack in #meta by chetansatasiya. View the logs.

7 years ago

#4 @SergeyBiryukov
7 years ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#5 @SergeyBiryukov
7 years ago

In 5860:

Support Forums: Introduce Users::get_user_topics_count() and ::get_user_reviews_count() methods.

The code is relocated from the wporg-support theme.

See #2967, #2772.

#6 @SergeyBiryukov
7 years ago

In 5861:

Support Theme: Use the methods added in [5860] in wporg_support_get_user_topics_count() and wporg_support_get_user_reviews_count().

See #2967, #2772.

#7 @SergeyBiryukov
7 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 5862:

Support Forums: Add caching for user's topics and reviews count queries.

Props ketuchetan for initial patch.
Fixes #2967.

#8 @SergeyBiryukov
7 years ago

In 5866:

Support Forums: Correct description for Users::get_user_reviews_count().

See #2967.

#9 @SergeyBiryukov
7 years ago

In 5950:

Support Forums: Clear user's topics and reviews count cache on spamming/unspamming, approving/unapproving, and archiving/unarchiving a topic.

See #2967.

Note: See TracTickets for help on using tickets.