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

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. 

主站蜘蛛池模板: 麻栗坡县| 白山市| 曲麻莱县| 开平市| 延庆县| 井冈山市| 定兴县| 綦江县| 会泽县| 民勤县| 出国| 砀山县| 新民市| 前郭尔| 金平| 江源县| 包头市| 托克逊县| 龙南县| 江陵县| 满洲里市| 新蔡县| 清原| 嵩明县| 富锦市| 巴塘县| 马公市| 巩义市| 镇巴县| 阿荣旗| 精河县| 湖北省| 密云县| 泸西县| 浦江县| 临潭县| 梁平县| 鲁山县| 宝应县| 昆山市| 专栏|