I am creating a temporary directory for each session to store some temporary files. I delete the directory when user logs out. But if user does not logout and just closes the browser, the directory remains. I guess the session info on the server side also will be hanging. How do I cleanup these?
abandoned session cleanup
write a function which parses session files inside all session dirs or checks its age and deletes them if they are older than e.g 24h
