update session and cache mechanism