commit | fc8c22ffbdeb3a584e9b1e301cd1a16497b4cae9 | [log] [tgz] |
---|---|---|
author | Igor Bondarenko <jetmind2@gmail.com> | Fri Sep 19 12:26:33 2014 +0300 |
committer | Igor Bondarenko <jetmind2@gmail.com> | Mon Sep 22 10:37:02 2014 +0300 |
tree | 90b81ccb93e774a1390a0c24429eea9401e28656 | |
parent | 5b619914878dbfb79c33262795a07d6bb308fa35 [diff] |
[#7644] ticket:658 Pre-populate roles cache to reduce # of mongo queries Also fix users_with_named_role so that it would actually use cache. Template for `/nf/new_projects/` displays admins for each project (and there can be a lot of projects) and it generates a lot of mongo queries to lookup user roles. Pre-populating the cache once helps to reduce query count more than twice, and improves overall page rendering time.