[dancer-users] Session expiration cleanup
wyml at etr-usa.com
Wed Feb 25 17:48:35 GMT 2015
I’m seeing two problems with session cleanup in Dancer 1.
I’m testing with YAML sessions and a purposely short session timeout:
session_expires: "1 minute”
After 1 minute of closing the tab that created the session, an ls in the sessions directory shows old session *.yml files still sitting there. Why aren’t these disappearing?
Second, I’ve got a pool of TCP connections to a back-end server, one per active session. When the session is logged out normally, I can find the corresponding connection and close it, too. But, if a session times out because it’s abandoned, my connection object never gets closed. (I’ve put a log message in its DESTROY method, and it never occurs.)
Is there a way to get Dancer to notify my code when it expires a session, so I can add some app-specific cleanup code?
More information about the dancer-users