| Crates.io | tower-sessions-file-store |
| lib.rs | tower-sessions-file-store |
| version | 0.2.0 |
| created_at | 2024-11-03 10:49:41.04499+00 |
| updated_at | 2025-03-30 07:17:53.566162+00 |
| description | Store sessions for Tower Session store on the file system |
| homepage | |
| repository | https://github.com/mousetail/tower-sessions-file-store |
| max_upload_size | |
| id | 1433571 |
| size | 28,243 |
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.