Use locks when accessing shared sessionCache
What does this MR do and why?
Fixes #435287 (closed)
Use locks when accessing shared sessionCache
We have experienced some CI test failures that appear to be related to a race condition when accessing the shared sessionCache.
This change extracts the logic to fetch the session to ensure we lock and unlock the cache during access.
Edited by Joe Woodward