public static function getNextSid() { $header = array_merge(array(), Request::http_parse_headers_short(headers_list())); $id = null; if (isset($header['Cachesid'])) { $id = intval($header['Cachesid']); if (self::$currentBaseSID !== $id) { return $id; } } if ($id === self::$currentBaseSID) { self::$currentBaseSID = self::$maxSid + 1; } self::$maxSid = self::$maxSid + 1; return self::$maxSid; }