Getting ready…

As we have already created a session variable in our previous recipe using the Gorilla cookie store, we will just extend this recipe to save session information in Redis rather than maintaining it on the server.

There are multiple implementations of the Gorilla session store, which you can find at https://github.com/gorilla/sessions#store-implementations. As we are using Redis as our backend store, we will be using https://github.com/boj/redistore, which depends on the Redigo Redis library to store a session.

This recipe assumes you have Redis and Redis Browser installed and running locally on ports 6379 and 4567 respectively.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.4.181