(04-22-2012 09:04 AM)Sama34 Wrote: And do you really thing it would bring more problems if I cache the users? I did so to void postbit queries at at ll.
Everybody seems to be afraid of plugins that make any extra query by post at postbit.
I also though about adding a user column to save users awards there instead, but to me it looks worse since I use others plugins that do something similar (newpoints, myachievements, etc..).
It's generally a bad idea to query for each post build, eg if there's 20 posts per page, a single query on postbit would add an extra 20 queries to the page load. 2 queries per postbit would be 40 etc.
That doesn't mean you can't query on postbit, you just need to ensure it only executes once.
Eg:
Or just cache on the users table, as one could assume that there won't be too many awards. If you're afraid of conflicting with another plugin, just ensure that your column name is unique.