From f3eaf5640cee73ec864aad523ea7e0b377137708 Mon Sep 17 00:00:00 2001 From: mait Date: Fri, 15 May 2020 14:14:43 +0300 Subject: [PATCH] Documentation update: RedisSessionBackend is renamed to RedisSession --- actix-redis/README.md | 6 +++--- actix-redis/src/session.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/actix-redis/README.md b/actix-redis/README.md index ef5392ca8..8b6a4cedd 100644 --- a/actix-redis/README.md +++ b/actix-redis/README.md @@ -20,7 +20,7 @@ Use redis as session storage. You need to pass an address of the redis server and random value to the -constructor of `RedisSessionBackend`. This is private key for cookie session, +constructor of `RedisSession`. This is private key for cookie session, When this value is changed, all session data is lost. Note that whatever you write into your session is visible by the user (but not modifiable). @@ -30,7 +30,7 @@ Constructor panics if key length is less than 32 bytes. ```rust use actix_web::{App, HttpServer, web, middleware}; use actix_web::middleware::session::SessionStorage; -use actix_redis::RedisSessionBackend; +use actix_redis::RedisSession; #[actix_rt::main] async fn main() -> std::io::Result { @@ -39,7 +39,7 @@ async fn main() -> std::io::Result { .middleware(middleware::Logger::default()) // cookie session middleware .middleware(SessionStorage::new( - RedisSessionBackend::new("127.0.0.1:6379", &[0; 32]) + RedisSession::new("127.0.0.1:6379", &[0; 32]) )) // register simple route, handle all methods .service(web::resource("/").to(index)) diff --git a/actix-redis/src/session.rs b/actix-redis/src/session.rs index 8502373c8..721dd00ee 100644 --- a/actix-redis/src/session.rs +++ b/actix-redis/src/session.rs @@ -20,7 +20,7 @@ use crate::redis::{Command, RedisActor}; /// Use redis as session storage. /// /// You need to pass an address of the redis server and random value to the -/// constructor of `RedisSessionBackend`. This is private key for cookie +/// constructor of `RedisSession`. This is private key for cookie /// session, When this value is changed, all session data is lost. /// /// Constructor panics if key length is less than 32 bytes.