Django Sessions

前端 未结 5 1383
野趣味
野趣味 2021-01-31 15:34

I\'m looking at sessions in Django, and by default they are stored in the database. What are the benefits of filesystem and cache sessions and when should I use them?

5条回答
  •  北恋
    北恋 (楼主)
    2021-01-31 16:20

    If the database have a DBA that isn't you, you may not be allowed to use a database-backed session (it being a front-end matter only). Until django supports easily merging data from several databases, so that you can have frontend-specific stuff like sessions and user-messages (the messages in django.contrib.auth are also stored in the db) in a separate db, you need to keep this in mind.

提交回复
热议问题