5
Sono novizio in redis, Ora voglio ottenere tutte le chiavi in un db senza conoscere le chiavi o il modello di chiavi. Dopo googling, ho trovato un codice sodu circa il mio problema, ma non ho motivo chiave o il campo di dati in questo codice:StackExchange.Redis come interrogare tutti i tasti solo su un db
var connection = ConnectionMultiplexer.Connect(new ConfigurationOptions
{
EndPoints = { { DemoSettings.CustomerRedisCache.Url, DemoSettings.CustomerRedisCache.Port } },
Password = DemoSettings.CustomerRedisCache.Password
});
var server = connection.GetServer(host: DemoSettings.CustomerRedisCache.Url,
port: DemoSettings.CustomerRedisCache.Port);
var cadena = "cust:" + data.SearchString.Replace(' ', ':')+"*";
var valores = server.Keys(pattern: cadena);
Grazie per le vostre risposte