[buddypress-trac] [BuddyPress Trac] #6221: messages-loop.php executes BP_Messages_Thread::populate() twice per conversation
buddypress-trac
noreply at wordpress.org
Wed Apr 8 21:07:49 UTC 2015
#6221: messages-loop.php executes BP_Messages_Thread::populate() twice per
conversation
------------------------------------+------------------
Reporter: wpdennis | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 2.3
Component: Component - Messaging | Version:
Severity: normal | Resolution:
Keywords: dev-feedback has-patch |
------------------------------------+------------------
Comment (by boonebgorges):
Thanks for working on this, r-a-y.
Small request: Can we move toward using integers for cache keys, and more
verbose cache groups? So `wp_cache_set( $thread_id, 'bp_messages_threads'
)` etc. It's more consistent, and makes it easier to do things like
`bp_get_non_cached_ids()` in the future.
I see that you didn't do individual message caching, but the more I think
about it, the more I guess it's probably not necessary. Messages are only
shown in the context of threads, and so they'll always be able to take
advantage of the thread cache. And messages can only belong to a single
thread, so there's not much point in making smaller, more portable message
caches. So this really covers my point (1), and replaces my suggestions
(2) and (3) with a simplified version. Seems good to me.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6221#comment:10>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list