I use StackExchange.Redis in my application to store keys / values. I need to clear all db that Redis uses. I found a way through the command How to delete everything in Redis? but how can I do this using StackExchange.Redis? I could not find any method for this?
I was looking for Empty, RemoveAll etc. on the IDatabase object and did not find anything.
The easiest way is to use the FlushDatabase or FlushDatabaseAsync method with IServer
ConnectionMultiplexer redis = ConnectionMultiplexer.Connect("localhost"); var server = redis.GetServer("localhost"); server.FlushDatabase();
Source: https://habr.com/ru/post/1243201/More articles:Global variable in Jest Unit Test - global-variableshttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1243197/migrate-eclipse-app-and-libs-to-android-studio&usg=ALkJrhhKgfO-bPaeUwHRUMHoDUVfLENmkgRealm Swift returns objects with all nil values - iosRequest camera permission on Android SDK 23 - javaSwift Realm: after writing a transaction link to zero - swiftRealm-iOS: object reference set to zero after saving - iosDefault connection pool for tomcat in spring-boot? - javaRealm object as a member is zero after saving - databaseHow to clean CrashLoopBackOff - kubernetesXML @style in parent - androidAll Articles