PaulGuo / F2E.im

A community for front-end-developer.
http://f2e.im
BSD 3-Clause "New" or "Revised" License
615 stars 217 forks source link

感觉F2E的session完全没有被用到 #13

Open zhu327 opened 9 years ago

zhu327 commented 9 years ago
    def get_current_user(self):
        user_id = self.get_secure_cookie("user")
        if not user_id: return None
        return self.user_model.get_user_by_uid(int(user_id))

BaseHandler直接就使用cookie获取id,然后从数据库中获取user的信息,用session的话这里不是应该从session中获取user吗?
搜索了下memcache,只在lib.session中使用了

zhaoyongjie commented 9 years ago

lib.session封装的memcache, application.py挂载。