MyBB Community Forums
[F] is_moderator is not cached - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: Archived Bug Reports (https://community.mybb.com/forum-74.html)
+------ Forum: MyBB 1.2.3 (https://community.mybb.com/forum-51.html)
+------ Thread: [F] is_moderator is not cached (/thread-17010.html)



[F] is_moderator is not cached - vnc - 2007-03-06

It seems that moderator permission of each forum is not cached, therefore if a site has 50 forums and subforums, if a user access to index.php, MyBB will do at least 50 queries to obtain is_moderator of that forum. The problem comming from get_moderator_permissions functions and is_moderator function in functions.php. Should we do some caching here?


RE: is_moderator is not cached - vnc - 2007-03-10

If a user is not admin and super modder, it will generate alot of queries if there are many sub-forums especially the index.php.

These similar queries just repeat many times:

 SELECT * FROM mybb_moderators WHERE uid='123' AND (fid='5' OR fid='7' OR fid='19' ....)

You can take a look at my site at http://mkportal.thevnchannel.com/support/index.php . I also activate debug info for registered users so you will know what's wrong. Currently it generate more than 70 queries in that index forum even I turned the modlist off.


RE: is_moderator is not cached - Dennis Tsang - 2007-03-11

Ok let's start this thread all over again (I split the other posts here).

Tikitiki's working on a fix for this.


RE: [F] is_moderator is not cached - Ryan Gordon - 2007-03-16

This bug has been fixed in the latest code.

Please note the latest code is not live on the site or for download. An update will be released which contains this fix.


RE: [F] is_moderator is not cached - vnc - 2007-04-13

May you show me how to fix this one?


RE: [F] is_moderator is not cached - vnc - 2007-05-17

This issue is not solved in MyBB 1.2.7 yet. It's still using many queries to obtain is_moderator forums and subforums. You can take a look here. I created some forum for testing.

http://vmk.110mb.com/demo/mybb/forum/index.php?debug=1
(The testing forum is on a free server which is not stable, You may have to try some times to reach this page)


RE: [F] is_moderator is not cached - Ryan Gordon - 2007-05-17

This is only fixed for MyBB 1.4 because it requires a rewrite of the Moderator Cache and that is also why you didn't receive a response for a fix.


RE: [F] is_moderator is not cached - vnc - 2007-05-18

I asked so because it was listed in Fixed Bug List in MyBB 1.2.7 Released - Security & Maintenance Release.
So if it is not fixed yet. It should be taken out of that list.

Best Regards,


RE: [F] is_moderator is not cached - Ryan Gordon - 2007-05-18

Gone


RE: [F] is_moderator is not cached - vnc - 2007-05-18

Good, Tikitiki.