I'd like to save the navigation history of the user to persistent storage once the session expires. I don't believe it is currently possible to execute a custom function on expiry. I am a bit unsure where I'd fit into the API.
I'd like to save the navigation history of the user to persistent storage once the session expires. I don't believe it is currently possible to execute a custom function on expiry. I am a bit unsure where I'd fit into the API.
Couldn't you do that in a custom Drop impl for your session object?
I'm not sure how you implement the persistence, if it's a file that will be OK, or if you need some database connection, something like Arc<Mutex<_>> in lazy_static could work
Couldn't you do that in a custom `Drop` impl for your session object?
I'm not sure how you implement the persistence, if it's a file that will be OK, or if you need some database connection, something like `Arc<Mutex<_>>` in `lazy_static` could work
I'd like to save the navigation history of the user to persistent storage once the session expires. I don't believe it is currently possible to execute a custom function on expiry. I am a bit unsure where I'd fit into the API.
Couldn't you do that in a custom
Drop
impl for your session object?I'm not sure how you implement the persistence, if it's a file that will be OK, or if you need some database connection, something like
Arc<Mutex<_>>
inlazy_static
could workAh, I hadn't thought about Drop. That's a great idea. Thanks so much for your reply :)