Opened 19 years ago
Closed 17 years ago
#4170 closed defect (bug) (fixed)
author pages do an uncached user_nicename lookup
| Reported by: | andy | Owned by: | westi |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.8 |
| Component: | Optimization | Version: | 2.1 |
| Severity: | minor | Keywords: | has-patch tested |
| Cc: | Focuses: |
Description
This isn't an issue until you have a large users table, but these lookups should be cached. Attaching a patch.
Attachments (3)
Change History (15)
#6
@
19 years ago
Looks ok.
I agree with rob1n that the function name should be changed. Furthermore IMHO the cache name should also reflect that user ids are cached, not nicenames. I'd call it user_id_by_nicename or sth. like that.
#8
@
18 years ago
- Keywords needs-patch added; has-patch 2nd-opinion removed
- Milestone 2.5 → 2.6
- Owner set to
Nice chunky patch that could do with some love as it no longer applies.
Pushing to 2.6 with needs-patch but will possibly accept for 2.5 if patch is updated.
#9
@
17 years ago
- Component Administration → Optimization
- Keywords has-patch tested added; needs-patch removed
- Milestone 2.9 → 2.8
new patch does the following, against 2.8/trunk:
- add a get_user_by_nicename() function that caches its results
- sets and flushes the cache where appropriate
- uses the function in WP_Query
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Shouldn't it be get_user_id_by_nicename()? Since it only returns the ID, as far as I can tell...
To me, get_user_by_nicename() returns an user object with that nicename.