...
|
...
|
@@ -28,8 +28,6 @@ module.exports = () => { |
|
|
|
|
|
// memcached中session的key
|
|
|
let cKey = `${config.sessionMemcachedPrefix}${req.sessionID}`,
|
|
|
|
|
|
// 用户信息session存储使用标志: true: memcached;false: cookie (只有当memcached不可用时)
|
|
|
uid = 0;
|
|
|
|
|
|
yield cache.get(cKey).catch(err => {
|
...
|
...
|
@@ -42,7 +40,7 @@ module.exports = () => { |
|
|
});
|
|
|
|
|
|
// 从 cookie 读取 UID
|
|
|
if (uid && req.cookies._UID && req.cookies._SESSION_KEY ) {
|
|
|
if (uid && req.cookies._UID && req.cookies._SESSION_KEY) {
|
|
|
|
|
|
let uidCookie = req.cookies._UID.split('::');
|
|
|
|
...
|
...
|
|