官术网_书友最值得收藏!

Introduction

Sometimes, we would like to persist information such as user data at an application level rather than persisting it in a database, which can be easily achieved using sessions and cookies. The difference between the two is that sessions are stored on the server side, whereas cookies are stored on the client side. We may also need to cache static data to avoid unnecessary calls to a database or a web service, and implement error handling while developing a web application. With knowledge of the concepts covered in this chapter, we will be able to implement all these functionalities in a fairly easy way.

In this chapter, we will start with creating an HTTP session, then we will learn how we can manage it using Redis, creating cookies, caching HTTP responses, implementing error handling, and eventually end with implementing login and logout mechanisms in Go. 

主站蜘蛛池模板: 灵台县| 东安县| 东莞市| 定州市| 财经| 三都| 隆尧县| 平邑县| 大竹县| 临沂市| 福贡县| 夹江县| 定安县| 清水河县| 卢湾区| 鸡西市| 徐闻县| 垦利县| 墨江| 微博| 资源县| 漳浦县| 缙云县| 山阳县| 上林县| 图木舒克市| 肃北| 鄂尔多斯市| 大渡口区| 富源县| 石家庄市| 长沙市| 玉门市| 石门县| 宜兰县| 石城县| 铜梁县| 鹤峰县| 兴仁县| 永丰县| 永吉县|