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

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. 

主站蜘蛛池模板: 诸城市| 肇州县| 稷山县| 玉溪市| 津市市| 隆回县| 四子王旗| 蒙城县| 竹山县| 远安县| 谢通门县| 五台县| 新晃| 潞西市| 南溪县| 甘德县| 乌苏市| 寻乌县| 上高县| 牡丹江市| 邢台县| 贡嘎县| 东安县| 平湖市| 隆子县| 福贡县| 娄烦县| 睢宁县| 岳阳市| 竹北市| 清徐县| 双城市| 依安县| 乌拉特前旗| 大姚县| 永寿县| 满洲里市| 铅山县| 黑河市| 镇平县| 青浦区|