Regex on memcached key?

Is it possible to capture a memcached key list based on some regular expression? I understand that one solution is to save the key in the database and grab the list when I need to delete these keys. This means that it will bear the extra cost for db.

I was wondering if there is another way to do this without DB overhead.

Cheers, Mickey

+3
source share
3 answers

No, there is no way to do this. The documentation offers a way to simulate a namespace , but that is.

+4
source

memcached is fast because it does not.

, , , , - - , .

0
    private static string CleanKey(string key)
    {
        var regex = new Regex("[^a-zA-Z0-9-]");
        var clean = regex.Replace(key, string.Empty);
        return clean.Length > 250 ? clean.Substring(0, 250) : clean;
    }
-1
source

Source: https://habr.com/ru/post/1738121/


All Articles