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

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. 

主站蜘蛛池模板: 武山县| 徐闻县| 措勤县| 连州市| 榕江县| 郸城县| 富阳市| 九龙坡区| 舞钢市| 沁源县| 凌云县| 五台县| 邵阳市| 舒城县| 台中县| 玉山县| 盐池县| 福鼎市| 正镶白旗| 育儿| 白山市| 海盐县| 南汇区| 金乡县| 三穗县| 团风县| 盖州市| 四川省| 清新县| 报价| 湟中县| 汉中市| 会同县| 碌曲县| 曲阜市| 云阳县| 黎川县| 萝北县| 南乐县| 涞源县| 和田县|