use std::sync::LazyLock; use actix_web::cookie::time::Duration; use cache::redis::{Script, ScriptInvocation}; use cache::{Cache, CacheConnection}; use config::redis::RedisConfig; use crate::error::SessionError; use crate::key::SessionKey; use crate::store::{SessionDiff, SessionState, SessionStore, generate_session_key}; const KEY_PREFIX: &str = "session"; const USER_BUCKET_PREFIX: &str = "user:session"; const SAVE_ATTEMPTS: usize = 3; static LOAD_SCRIPT: LazyLock