I'm trying to use go-cache for session storage, I am storing hashed session tokens and user ids. As part of the login function, I generate a random number to be sent to the user as a cookie, then I hash that and use the c.Set functinon to set it (along with the user id) in go cache, and it adds over 900ms of latency to the page response. Most browsers expect a response within 500ms.
I don't know if this is expected (and if so if there are any ways to speed it up) or if I am doing something wrong, here is my code:
Hello,
I'm trying to use go-cache for session storage, I am storing hashed session tokens and user ids. As part of the login function, I generate a random number to be sent to the user as a cookie, then I hash that and use the c.Set functinon to set it (along with the user id) in go cache, and it adds over 900ms of latency to the page response. Most browsers expect a response within 500ms.
I don't know if this is expected (and if so if there are any ways to speed it up) or if I am doing something wrong, here is my code:
Any help would be appreciated.