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

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. 

主站蜘蛛池模板: 汉中市| 凤台县| 汤原县| 宜城市| 古浪县| 盐池县| 曲水县| 雅安市| 祁门县| 邢台县| 榕江县| 福建省| 张家港市| 上思县| 尉氏县| 西青区| 浪卡子县| 潮州市| 闸北区| 东兰县| 满城县| 綦江县| 平乡县| 六盘水市| 南安市| 太湖县| 津市市| 吐鲁番市| 铜陵市| 枞阳县| 无锡市| 霍州市| 泌阳县| 洪雅县| 黔东| 霍城县| 黔西| 鄂伦春自治旗| 衡南县| 青神县| 滁州市|