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

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. 

主站蜘蛛池模板: 鄯善县| 宁城县| 太和县| 宜州市| 凉城县| 商河县| 波密县| 武威市| 通城县| 乡城县| 武安市| 明水县| 昔阳县| 肇州县| 莱西市| 广昌县| 英吉沙县| 辽源市| 洛浦县| 哈尔滨市| 寿阳县| 孟津县| 尉犁县| 阜新市| 浦东新区| 龙门县| 山阴县| 黄山市| 松阳县| 磴口县| 沙雅县| 孙吴县| 石嘴山市| 探索| 东山县| 丹巴县| 甘谷县| 巴楚县| 安泽县| 大邑县| 盘锦市|