谷歌应用引擎会话 [英] google app engine session

查看:87
本文介绍了谷歌应用引擎会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. 什么是java应用程序引擎,默认会话超时?如果我们将sesion时间设置为很长时间,那么
  2. 会有什么不好的影响,因为google app引擎会话默认存储在数据存储中? (就像facebook一样,每次你浏览页面,会话都会一直存在)?

    1. 默认会话超时设置为30分钟。 (你可以验证它调用 getMaxInactiveInterval 方法)

    2. 有了您的应用程序的相当有限的信息,我没有看到任何影响。

      使用 setMaxInactiveInterval(-1)指示Session永远不会超时。
      请记住,您还需要覆盖JSESSIONID Cookie MaxAge,以防止在浏览器关闭时丢失Session。


    1. what is java app engine,default session time out ?
    2. will that be any bad impact if we set sesion time out to very very long time, since google app engine session is just store in datastore by default? (just like facebook, each time you go to the page, the session still exist forever) ?

    解决方案

    1. Default session timeout is set to 30 Minutes. (you can verify it calling getMaxInactiveInterval method)
    2. With that fairly limited info about your app, I don't see any impact.
      Using setMaxInactiveInterval(-1) indicates that the Session should never timeout. Keep in mind that you also need to overwrite the JSESSIONID cookie MaxAge to prevent to lose the Session when the browser is closed.

    这篇关于谷歌应用引擎会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆