introduce cache and session