Explain how you would implement a custom data structure to store and retrieve real-time user session data.