Function ntex_redis::cmd::Reset
source · pub fn Reset() -> ResetCommand
Expand description
RESET redis command This command performs a full reset of the connection’s server-side context, mimicking the effect of disconnecting and reconnecting again.
use ntex_redis::{cmd, RedisConnector};
#[ntex::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let redis = RedisConnector::new("127.0.0.1:6379").connect().await?;
// reset connection
let response = redis.exec(cmd::Reset()).await?;
assert_eq!(&response, "RESET");
Ok(())
}