code: public MapSession getSession(String id, boolean updateTTL) {
        return Optional.ofNullable(cache.get(id))
              .map(v -> (MapSession) v.get())
              .map(v -> updateTTL(v, updateTTL))
              .orElse(null);
     }
docs: Returns session with optional parameter whether or not update time accessed.
  
  @param id        Session ID.
  @param updateTTL <code>true</code> if time accessed needs to be updated.
  @return Session or <code>null</code> if it doesn't exist.