Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#13075 closed defect (bug) (fixed)

*_metadata() functions do not clear the users cache

Reported by: ryan's profile ryan Owned by:
Milestone: 3.0 Priority: low
Severity: normal Version:
Component: Users Keywords: has-patch
Focuses: Cc:

Description

The 'users' cache includes metadata for each user. When metadata is updated for the 'user' meta_type, the metadata functions should clear the users cache.

Attachments (1)

13075.diff (1.4 KB) - added by scribu 14 years ago.
use hooks to delete user cache

Download all attachments as: .zip

Change History (6)

#1 @ryan
14 years ago

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

(In [14179]) Clear the users cache when updating user metadata. fixes #13075

#2 @scribu
14 years ago

Maybe those checks would have been better placed in update_user_meta() ...

@scribu
14 years ago

use hooks to delete user cache

#3 @scribu
14 years ago

  • Keywords has-patch added
  • Priority changed from normal to low
  • Resolution fixed deleted
  • Status changed from closed to reopened

#4 @nacin
14 years ago

Maybe those checks would have been better placed in update_user_meta() ...

I think I disagree. I would think that metadata functions should work exactly like the user, post, and comment wrappers. Thus, any object-specific code should be in the metadata API.

That said, I like using hooks. That also leads me to thinking about #11254.

#5 @ryan
14 years ago

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

None of our clean cache functions are on hooks. Any cleaning customizations should be done from hooks within the cleaners, I think. The current method is good enough for 3.0.

Note: See TracTickets for help on using tickets.