public void setCacheManager(CacheManager cacheManager) {
        this.cacheManager = cacheManager;
        applyCacheManagerToSessionDAO();
    }
Sets whether or not sessions should be automatically deleted after they are discovered to be invalid.  Default
value is {@code true} to ensure no orphans will exist in the underlying data store.
<h4>WARNING</h4>
Only set this value to {@code false} if you are manually going to delete sessions yourself by some process
(quartz, cron, etc.) external to Shiro's control.  See the
{@link #isDeleteInvalidSessions() isDeleteInvalidSessions()} JavaDoc for more.

@param deleteInvalidSessions whether or not sessions should be automatically deleted after they are discovered
                             to be invalid.
@since 1.0
core/src/main/java/org/apache/shiro/session/mgt/DefaultSessionManager.java