• Модуль: socialservices
  • Путь к файлу: ~/bitrix/modules/socialservices/classes/general/authmanager.php
  • Класс: CSocServAuthManager
  • Вызов: CSocServAuthManager::GetCachedUserOption
static function GetCachedUserOption($option)
{
	global $USER;
	$result = '';
	if(is_object($USER))
	{
		$userId = $USER->GetID();
		$ttl = 10000;
		$cache_id = 'socserv_user_option_'.$userId;
		$obCache = new CPHPCache;
		$cache_dir = '/bx/socserv_user_option';

		if($obCache->InitCache($ttl, $cache_id, $cache_dir))
			$result = $obCache->GetVars();
		else
		{
			$result = CUtil::JSEscape(CUserOptions::GetOption("socialservices", $option, "N", $USER->GetID()));
			if($obCache->StartDataCache())
				$obCache->EndDataCache($result);
		}

	}

	return $result;
}