MyBB Community Forums

Full Version: Cache Question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
What're the functions I have to call to rebuild the usergroup and forum caches?
This is a function I have created to update various caches. Of course, the input variables have to be created first.

function myfunction()
{
global $output, $db, $mybb, $errors, $cache, $lang;

// Rebuild cache with saved values

require_once MYBB_ROOT.'inc/class_datacache.php';
$cache = new datacache;
$cache->update_usergroups();
$cache->update_forumpermissions();
$cache->update_forums();
$cache->update_moderators();
}
Thanks, that worked great.