public static function getCompositeTag($class, $fields)
    {
        if (is_object($class) && $class instanceof ActiveRecord) {
            $class = $class->className();
        } elseif (!is_string($class)) {
            throw new InvalidParamException('Param $class must be a string or an object.');
        }

        return $class .
            '[CompositeTag(' .
            self::getCacheKeyById($fields, true) .
            '):(' .
            self::getCacheKeyById($fields) .
            ')]';
    }