Sometimes password_policy_user($op='load') can produce many redundant and same db queries. Maybe it will be good to add static cache for this query.

Comments

gdud’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
StatusFileSize
new1.81 KB

Here is a patch.

gdud’s picture

Here is a patch

Sorry, it's may mistake. Forgot about this patch (in comment #2). I can't remove it :-(

erikwebb’s picture

Title: Implements hook_user() and static cache proposal » Implement static cache for hook_user() force password change checks
Status: Active » Needs review

I'm all for static caching and this looks like a clean patch. Can I get a +1?

@gdud - What is the patch in #2?

gdud’s picture

@erikwebb: It's my mistake. I did similar changes in two modules: password policy and uuid and a had open two tabs in browser with two issues. I put this patch in wrong one. I don't have permissions to delete it, so it is still here.

erikwebb’s picture

Status: Needs review » Postponed (maintainer needs more info)

This is only making improvements when making multiple user loads on a single request. Do you have any numbers on how much more efficient this would become? At this point I'm weary of adding anything new to 6.x-1.x.

erikwebb’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)