ClickHouse is using infinite cache for compiled regular expressions.
Hyperscan can use several megabytes per compiled regexp.
It makes infinite memory growth possible:

```
clickhouse-benchmark --query "SELECT multiFuzzyMatchAny('Hello, world', 5, ['(' || (SELECT toString(rand(1))) || '|' || (SELECT toString(rand(2))) || ')+(' || (SELECT toString(rand(3))) || '|' || (SELECT toString(rand(4))) || ')+(' || (SELECT toString(rand(5))) || ')+'])"
```

Possible solutions:
- simply drop cache if its size is 1000 entries;
- replace to LRU cache with 1000 entries.

patterns.data(),
            flags.data(),
            ids.get(),
            ext_exprs_ptrs.data(),
            patterns.size(),
            HS_MODE_BLOCK,
            nullptr,
            &db,
            &compile_error);
    if (err != HS_SUCCESS)
    {
        
        CompilerError error(compile_error);
        if (error->expression < 0)
            throw Exception(String(error->message), ErrorCodes::LOGICAL_ERROR);
        else
            throw Exception(
                "Pattern '" + str_patterns[error->expression] + "' failed with error '" + String(error->message),
                ErrorCodes::BAD_ARGUMENTS);
    }
    ProfileEvents::increment(ProfileEvents::RegexpCreated);
    
    
    hs_scratch_t * scratch = nullptr;
    err = hs_alloc_scratch(db, &scratch);
    
    if (err != HS_SUCCESS)
        throw Exception("Could not allocate scratch space for hyperscan", ErrorCodes::CANNOT_ALLOCATE_MEMORY);
    return {db, scratch};
}