Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] is_moderator is not cached
#1
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?
[Image: vnchannel0.png]

MKP | MKV (EN) | VNC (EN)
#2
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:

PHP Code:
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.
[Image: vnchannel0.png]

MKP | MKV (EN) | VNC (EN)
#3
Ok let's start this thread all over again (I split the other posts here).

Tikitiki's working on a fix for this.
Dennis Tsang
http://dennistt.net
#4
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.
#5
May you show me how to fix this one?
[Image: vnchannel0.png]

MKP | MKV (EN) | VNC (EN)
#6
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)
[Image: vnchannel0.png]

MKP | MKV (EN) | VNC (EN)
#7
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.
#8
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,
[Image: vnchannel0.png]

MKP | MKV (EN) | VNC (EN)
#9
Gone
#10
Good, Tikitiki.
[Image: vnchannel0.png]

MKP | MKV (EN) | VNC (EN)


Forum Jump:


Users browsing this thread: 1 Guest(s)