2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Flask-KVSessionとMemcachedを組み合わせる際はセッションの有効期限に注意

Posted at

別にFlask-KVSessionに限った話ではありませんが…

Flask-KVSessionはセッションの有効期限としてFlaskのPERMANENT_SESSION_LIFETIMEを用いますが、この値はデフォルトでは31日間となっています。
しかし、Memcachedで指定できる有効期限が最長30日間であるため、正しく保存することができません。
PERMANENT_SESSION_LIFETIMEを30日間以下にするなりして対処しましょう。

2
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?