public static function key(string $key, array $params = []): string
    {
        $key = md5(serialize($key));
        if (count($params) > 0) {
            $key .= '-' . md5(serialize($params));
        }
        return $key;
    }
public static function key(string $key, array $params = []): string
    {
        $key = md5(serialize($key));
        if (count($params) > 0) {
            $key .= '-' . md5(serialize($params));
        }
        return $key;
    }
public static function key ( string $ key , array $ params = [ ] ) : string { $ key = md5 ( serialize ( $ key ) ) ; if ( count ( $ params ) > 0 ) { $ key .= '-' . md5 ( serialize ( $ params ) ) ; } return $ key ; }
Generate key based on input key and parameters. Used in more sophisticated keys.

@param string $key
@param string[] $params Default [].
@return string
Generate key based on input key and parameters . Used in more sophisticated keys .