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.

using CacheTable = std::array<StringAndRegexp, max_regexp_cache_size>;
    CacheTable known_regexps;
};
}
#if USE_VECTORSCAN
namespace MultiRegexps
{
template <typename Deleter, Deleter deleter>
struct HyperscanDeleter
{
    template <typename T>
    void operator()(T * ptr) const
    {
        deleter(ptr);
    }
};
using CompilerError = std::unique_ptr<hs_compile_error_t, HyperscanDeleter<decltype(&hs_free_compile_error), &hs_free_compile_error>>;
using ScratchPtr = std::unique_ptr<hs_scratch_t, HyperscanDeleter<decltype(&hs_free_scratch), &hs_free_scratch>>;
using DataBasePtr = std::unique_ptr<hs_database_t, HyperscanDeleter<decltype(&hs_free_database), &hs_free_database>>;
class Regexps
{
public:
    Regexps(hs_database_t * db_, hs_scratch_t * scratch_) : db{db_}, scratch{scratch_} { }
    hs_database_t * getDB() const { return db.get(); }
    hs_scratch_t * getScratch() const { return scratch.get(); }
private:
    DataBasePtr db;
    ScratchPtr scratch;
};
class RegexpsConstructor