static function cache_namespace($user_perms = true)
	{
		$ns_parts = array();
		if(empty($_SERVER['HTTP_HOST']))
			$ns_parts[] = 'cli';
		elseif(!preg_match('/^\d+\.\d+\.\d+\.\d+$/', $_SERVER['HTTP_HOST'])) // Если это доменное имя
			$ns_parts[] = str_replace(':', '=', strtolower($_SERVER['HTTP_HOST']));
		elseif($_SERVER['HTTP_HOST'] != gethostbyname(gethostname()))
			$ns_parts[] = 'unknown';

		$ns_parts[] = Cfg::get('project.name');

		if($user_perms && !empty($_SERVER['USER']))
			$ns_parts[] = strtolower($_SERVER['USER']);

		if(($cs = Cfg::get('internal_charset')) && $cs != 'utf-8')
			$ns_parts[] = 'i'.$cs;

		if(($cs = Cfg::get('output_charset')) && $cs != 'utf-8')
			$ns_parts[] = 'o'.$cs;

		if(!empty($_SERVER['BORS_INSTANCE']))
			$ns_parts[] = $_SERVER['BORS_INSTANCE'];

		return array_filter($ns_parts);
	}