简体   繁体   English

金字塔烧杯-会话永不过期

[英]pyramid beaker - session never expired

I am currently developing application in pyramid framework. 我目前正在开发金字塔框架中的应用程序。 Following are my settings in development.ini 以下是我在development.ini中的设置

session.type = file
session.data_dir = data/sessions/data
session.lock_dir = data/sessions/lock
session.key = mykey
session.secret = mysecret
session.cookie_on_exception = true
session.cookie_expires = true
session.cookie_max_age = 120
session.timeout = 120

my problem is session never expired. 我的问题是会话永不过期。 What am I missing? 我想念什么?

Maybe you forgot to setup pyramid_beaker properly during application startup as mentioned here 也许您忘了在应用程序启动期间正确设置pyramid_beaker,如此处所述

If you want more control, follow this way 如果您想要更多控制权,请按照这种方式

Remove the parameter below from your settings. 从您的设置中删除以下参数。 It is an option for pyramid.session.UnencryptedCookieSessionFactoryConfig . 它是pyramid.session.UnencryptedCookieSessionFactoryConfig的选项。 You switched to using pyramid_beaker. 您切换为使用pyramid_beaker。

session.cookie_max_age = 120

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM