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.

else
            {
                
                const UInt8 * const begin = haystack.data();
                const UInt8 * const end = haystack.data() + haystack.size();
                const UInt8 * pos = begin;
                size_t i = 0;
                const UInt8 * next_pos = begin;
                
                if (required_substring.size() <= N)
                {
                    Searcher searcher(required_substring.data(), required_substring.size(), end - pos);
                    
                    while (pos < end && end != (pos = searcher.search(pos, end - pos)))
                    {
                        
                        while (next_pos + N <= pos)
                        {
                            res[i] = negate;
                            next_pos += N;
                            ++i;
                        }
                        next_pos += N;
                        if (pos + required_substring.size() <= next_pos)
                        {
                            
                            if (is_trivial)
                                res[i] = !negate;
                            else
                            {