Small code cleanup on CacheManager and SessionManager.