Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ use actix_request_reply_cache::RedisCacheMiddlewareBuilder;
async fn main() -> std::io::Result<()> {
// Create the cache middleware with default settings
let cache = RedisCacheMiddlewareBuilder::new("redis://127.0.0.1:6379")
.build()
.await;
.build();

HttpServer::new(move || {
App::new()
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ type CacheKeyFn = Arc<dyn Fn(&CacheContext) -> String + Send + Sync>;
///
/// This middleware intercepts responses, caches them in Redis, and serves
/// cached responses for subsequent matching requests when available.
#[derive(Clone)]
pub struct RedisCacheMiddleware {
redis_conn: Option<MultiplexedConnection>,
redis_url: String,
Expand Down