/** * @see wcf\data\IEditableCachedObject::resetCache() */ public static function resetCache() { // clear cache UserGroupCacheBuilder::getInstance()->reset(); UserGroupPermissionCacheBuilder::getInstance()->reset(); // clear sessions SessionHandler::resetSessions(); }
/** * Loads group data from cache. */ protected function loadGroupData() { if ($this->groupData !== null) { return; } // work-around for setup process (package wcf does not exist yet) if (!PACKAGE_ID) { $groupIDs = array(); $sql = "SELECT\tgroupID\n\t\t\t\tFROM\twcf" . WCF_N . "_user_to_group\n\t\t\t\tWHERE\tuserID = ?"; $statement = WCF::getDB()->prepareStatement($sql); $statement->execute(array($this->user->userID)); while ($row = $statement->fetchArray()) { $groupIDs[] = $row['groupID']; } } else { $groupIDs = $this->user->getGroupIDs(); } // get group data from cache $this->groupData = UserGroupPermissionCacheBuilder::getInstance()->getData($groupIDs); if (isset($this->groupData['groupIDs']) && $this->groupData['groupIDs'] != $groupIDs) { $this->groupData = array(); } }
/** * Loads group data from cache. */ protected function loadGroupData() { // get group data from cache $this->groupData = UserGroupPermissionCacheBuilder::getInstance()->getData($this->getGroupIDs()); if (isset($this->groupData['groupIDs']) && $this->groupData['groupIDs'] != $this->getGroupIDs()) { $this->groupData = array(); } }