Fix unit test for cache-based sessions