protected Session getCachedSession(Serializable sessionId) {
        Session cached = null;
        if (sessionId != null) {
            Cache<Serializable, Session> cache = getActiveSessionsCacheLazy();
            if (cache != null) {
                cached = getCachedSession(sessionId, cache);
            }
        }
        return cached;
    }
Returns the cached session with the corresponding {@code sessionId} or {@code null} if there is
no session cached under that id (or if there is no Cache).

@param sessionId the id of the cached session to acquire.
@return the cached session with the corresponding {@code sessionId}, or {@code null} if the session
does not exist or is not cached.
core/src/main/java/org/apache/shiro/session/mgt/eis/CachingSessionDAO.java