MyBB Community Forums
Getting forum name from cache for plugin - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Development (https://community.mybb.com/forum-68.html)
+---- Thread: Getting forum name from cache for plugin (/thread-170485.html)



Getting forum name from cache for plugin - _Jerry_ - 2015-05-09

I am creating a plugin, I wanted to get forum names using the forum ID, instead of querying the DB everytime, is there a way to get it from MyBB cache? Am I missing something here?


RE: Getting forum name from cache for plugin - StefanT - 2015-05-09

Something like that should work:
$forums = $cache->read('forums');
$forumname = $forums[$fid]['name'];



RE: Getting forum name from cache for plugin - _Jerry_ - 2015-05-09

Perfect! Thank you