[Answered ]-Django: Reasonable to store session data in Class Variable?

2๐Ÿ‘

โœ…

I see a lot of reasons not to do it.

Iโ€™m sure caching solutions offer robust solutions to memory management. This includes running as a daemon. Having cache invalidation, setting lifetimes on the data.

By setting a classvariable, you are forgoing the above things.

Additionally, caching solutions provide a clean documented, api for interfacing with them.

๐Ÿ‘คdm03514

Leave a comment