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

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. 

主站蜘蛛池模板: 丰台区| 兰州市| 池州市| 乌兰浩特市| 汉沽区| 磴口县| 田东县| 乃东县| 酉阳| 永宁县| 芷江| 三原县| 彭州市| 南城县| 洪湖市| 焉耆| 高陵县| 青浦区| 五家渠市| 贵州省| 虞城县| 马边| 怀宁县| 得荣县| 长泰县| 靖西县| 砚山县| 清河县| 咸宁市| 申扎县| 达州市| 丹东市| 金门县| 信阳市| 北碚区| 沾益县| 丰台区| 连山| 隆化县| 鞍山市| 福海县|