Skip to content

mousetail/tower-sessions-file-store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

let session_store = FileSessionStorage::new();
let session_layer = SessionManagerLayer::new(session_store)
    .with_expiry(Expiry::OnInactivity(Duration::secs(60 * 60)));
let deletion_task = tokio::task::spawn(
    session_store
        .clone()
        .continuously_delete_expired(tokio::time::Duration::from_secs(60 * 60)),
);

app.layer(session_layer);

Issues or pull requests welcome.

About

A tower sessions plugin to store the data on the disk

Topics

Resources

License

Stars

Watchers

Forks

Languages