Add support for SessionDestroyedEvent so that applications can detect
when a Spring Session has expired or explicitly deleted. This will
ensure that we can cleanup resources (i.e. WebSockets) can be cleaned up
when a Session ends.
Fixes gh-60
Redis key expiration has no guarantees of when the expired key is
actually removed. In some instances, it is necessary to clean up resources
as soon as the sessione expires. For example, when an HTTP Session expires
we must ensure that the associated Web Socket sessions are closed.
Sessions are now mapped to their expiration times and a background task
is used to clean up the sessions as they expire.
Fixes gh-59
At times OnCommittedResponseWrapper#onResponseCommitted() can be invoked
multiple times. For example, when flush is performed multiple times. This
means that the session can be written multiple times which is inefficient.
Instead, we should only save on the first update.
Fixes gh-57
Previously the key contained spring-security-sessions in it since the
project was originally going to be a part of Spring Security.
This commit moves it to spring:session:sessions: to better align with
being part of Spring Session
Fixes#46
This provides a better separation for consumers of the API. Most users are
likely not interested in checking to see if a session is expired so they
can focus on the Session API.
Fixes#28