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

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. 

主站蜘蛛池模板: 石家庄市| 鹤壁市| 平凉市| 定州市| 黄山市| 钦州市| 白河县| 南川市| 柘荣县| 扬州市| 磐石市| 金平| 和田县| 盐池县| 彭泽县| 西青区| 东莞市| 本溪市| 拉萨市| 通辽市| 太康县| 呼伦贝尔市| 绥滨县| 读书| 新干县| 扎兰屯市| 沂源县| 来凤县| 通河县| 和政县| 景洪市| 咸阳市| 徐水县| 互助| 莎车县| 贵阳市| 酒泉市| 新巴尔虎左旗| 滨海县| 利津县| 屏南县|