开发者

Django a way to store user-level data

I'm looking for an efficient way to store some user-level data that do not need to be persistent.

For example, I would like to show user a different error message when user encounters the same error more than once. Right now I generate a user-unique key and then add it to the c开发者_如何学Goache system.

I first thought to store it in the user session, but it is stored in database and I don't need it to be stored there. It's ok if this data will be lost on server restart/shutdown.

May be there is a better solution for such cases?


The session is the right place. If you don't want to use the database, then don't use a database session backend.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜