Closed insionng closed 9 years ago
刚发现 加上配置 并设定过期时间后可以成功删除过期session, 后续我再在线上运行一段时间看看效果如何.大概可能不设置配置的话,就是永久不过期的感觉...等验证了再来给差评.
已经确认session.Options不设置是不会过期的,起码是不会在3600s内过期,默认内里设定的过期时间成了摆设了.这应该是个bug吧,不过设置了session.Options就不会有问题.
代码重新优化过,有待进一步论证。
sess.GetActiveSession undefined (type session.Store has no field or method GetActiveSession)
更新后出现这错误,貌似 sess.GetActiveSession不在session.Store里.
http://www.yougam.com/ 用了下面这句简单的获取当前激活的session来作为统计在线人数的代码
但常发现在线人数可以飙升到几百上千,3千5千都见识过..但事实的真相是肯定不存在这么多人在线的..