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.

#pragma once
#include <type_traits>
#include <base/types.h>
#include <Common/Volnitsky.h>
#include <Columns/ColumnString.h>
#include <Core/ColumnNumbers.h>
#include "Regexps.h"
#include "config_functions.h"
#include <Common/config.h>
#include <re2_st/re2.h>
namespace DB
{
namespace ErrorCodes
{
    extern const int ILLEGAL_COLUMN;
}
namespace impl
{
inline bool likePatternIsSubstring(std::string_view pattern, String & res)
{
    if (pattern.size() < 2 || pattern.front() != '%' || pattern.back() != '%')
        return false;
    res.clear();
    res.reserve(pattern.size() - 2);
    const char * pos = pattern.data() + 1;
    const char * const end = pattern.data() + pattern.size() - 1;
    while (pos < end)