Skip to content

Troubles, when key contains special escape  #65

@Bolg08

Description

@Bolg08

I have a method, which add data to HSET
The key of рash is the path as Path.Combine

var baseAddress =Path.Combine(address,obj.GetType().FullName);
var pattern = baseAddress + "*";
var keys = await _client.KeysAsync(pattern);
var properties = obj.GetProperties();
await _client.HSetAsync(Path.Combine(baseAddress,keys.Length.ToString()),
key,value);

In redis, the key is written including special escape as `"a\\c" (for example)

When i try to get a list of keys using KeysAsync(pattern) i get an empty list
If in the search pattern i replace all special escape (example: "a\\c" to "a\\\\c" ) i get true result

Help solve the problem?

Why in KeysAsync and HSetAsync keys are interpreted differently?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions