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

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. 

主站蜘蛛池模板: 连平县| 平山县| 沅江市| 荣成市| 红桥区| 肥城市| 中宁县| 巴彦淖尔市| 微博| 鹿邑县| 祥云县| 县级市| 根河市| 永修县| 武冈市| 凤山县| 浦北县| 监利县| 桃源县| 西乌珠穆沁旗| 凭祥市| 宜丰县| 休宁县| 阿城市| 错那县| 永川市| 察隅县| 将乐县| 航空| 凤翔县| 泰宁县| 通渭县| 保靖县| 英吉沙县| 涪陵区| 辛集市| 三门县| 志丹县| 镶黄旗| 水富县| 金寨县|