#15715 closed enhancement (invalid)
Add page load caching to get_users_of_blog()
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0.2 |
Component: | Users | Keywords: | needs-patch |
Focuses: | Cc: |
Description (last modified by )
Theme authors often use get_users_of_blog() in various area to style/present blog authors. Unfortunately, the query resulting from this function isn't cached, and can be quite expensive in a large multisite environment.
Proposed patch adds simple caching to get_users_of_blog()
Attachments (1)
Change History (8)
#2
@
14 years ago
- Keywords needs-patch added; has-patch removed
- Milestone changed from Awaiting Review to Future Release
- Version set to 3.0.2
#3
@
14 years ago
This cache should only last for the page load so doesn't need invalidation.
It just needs registering as non-persistent in the right places with wp_cache_add_non_persistent_groups
#5
@
14 years ago
Rethinking this:
get_users_of_blog() returns the complete users objects for every users, yet scenarios where only user ids/nicenames/email are required, are the reason I opened this ticket in the first place.
A better solution would probably be to have a function that can return specific columns of the user table.
Does that make sense?
The cache also needs to be invalidated.