Showing
1 changed file
with
1 additions
and
3 deletions
@@ -28,8 +28,6 @@ module.exports = () => { | @@ -28,8 +28,6 @@ module.exports = () => { | ||
28 | 28 | ||
29 | // memcached中session的key | 29 | // memcached中session的key |
30 | let cKey = `${config.sessionMemcachedPrefix}${req.sessionID}`, | 30 | let cKey = `${config.sessionMemcachedPrefix}${req.sessionID}`, |
31 | - | ||
32 | - // 用户信息session存储使用标志: true: memcached;false: cookie (只有当memcached不可用时) | ||
33 | uid = 0; | 31 | uid = 0; |
34 | 32 | ||
35 | yield cache.get(cKey).catch(err => { | 33 | yield cache.get(cKey).catch(err => { |
@@ -42,7 +40,7 @@ module.exports = () => { | @@ -42,7 +40,7 @@ module.exports = () => { | ||
42 | }); | 40 | }); |
43 | 41 | ||
44 | // 从 cookie 读取 UID | 42 | // 从 cookie 读取 UID |
45 | - if (uid && req.cookies._UID && req.cookies._SESSION_KEY ) { | 43 | + if (uid && req.cookies._UID && req.cookies._SESSION_KEY) { |
46 | 44 | ||
47 | let uidCookie = req.cookies._UID.split('::'); | 45 | let uidCookie = req.cookies._UID.split('::'); |
48 | 46 |
-
Please register or login to post a comment