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

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. 

主站蜘蛛池模板: 哈密市| 许昌县| 长岭县| 鄂州市| 象州县| 西充县| 金湖县| 泰来县| 临西县| 盐山县| 抚宁县| 奇台县| 汉寿县| 宿州市| 扎赉特旗| 北辰区| 巴塘县| 原平市| 灵璧县| 稻城县| 康平县| 阿克陶县| 富民县| 五大连池市| 台南市| 海南省| 曲周县| 霸州市| 孙吴县| 巴南区| 岗巴县| 昌平区| 五原县| 黄大仙区| 宜兰市| 共和县| 东乡族自治县| 龙南县| 龙山县| 乌兰县| 临泽县|