[buddypress-trac] [BuddyPress Trac] #5402: Object cache - bp_core_get_user_domain() issue

buddypress-trac noreply at wordpress.org
Sat Feb 15 00:19:37 UTC 2014


#5402: Object cache - bp_core_get_user_domain() issue
--------------------------+-----------------
 Reporter:  r-a-y         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  2.0
Component:  Core          |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------
 '''Issue:''' When object cache is enabled and you change the members
 directory page slug to something else, the member permalink references the
 older member page slug and not the newer one.

 '''Steps to duplicate:'''

 1. Turn on object caching.
 2. Change the members directory page slug to something else.
 3. Navigate to the Members Directory page.
 4. Hover over a member permalink in the member loop.
 5. The member permalink references the older members directory page slug
 and not the newer one.

 '''Problem:''' `bp_core_get_user_domain()` has its own object cache, which
 is impossible to clear because it is keyed to each individual user.

 We shouldn't be caching the user domain as we are already caching the
 username lookup, which is the most intensive part of this function to
 begin with.  Therefore, the attached patch removes the object cache for
 `bp_core_get_user_domain()` and leaves the `pre_cache` filter in place for
 backpat.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5402>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list