Add session$onFlush and session$onFlushed