code: async function refreshSession (ctx, session, originalHash, isNew) {
  
      // reject any session changes, and do not update session expiry
      if(ctx._sessionSave === false) {
        return debug('session save disabled')
      }
  
      //delete session
      if (!session) {
        if (!isNew) {
          debug('session set to null, destroy session: %s', ctx.sessionId)
          sessionIdStore.reset.call(ctx)
          return store.destroy(ctx.sessionId)
        }
        return debug('a new session and set to null, ignore destroy')
      }
  
      // force saving non-empty session
      if(ctx._sessionSave === true) {
        debug('session save forced')
        return saveNow(ctx, ctx.sessionId, session)
      }
  
      const newHash = hash(session)
      // if new session and not modified, just ignore
      if (!options.allowEmpty && isNew && newHash === EMPTY_SESSION_HASH) {
        return debug('new session and do not modified')
      }
  
      // rolling session will always reset cookie and session
      if (!options.rolling && newHash === originalHash) {
        return debug('session not modified')
      }
  
      debug('session modified')
  
      await saveNow(ctx, ctx.sessionId, session)
  
    }
docs: after everything done, refresh the session
  if session === null; delete it from store
  if session is modified, update cookie and store