tjcsl / ion

TJ Intranet 3
https://ion.tjhsst.edu
GNU General Public License v2.0
99 stars 91 forks source link

Increase redis priority of session cache #351

Closed pefoley2 closed 5 years ago

pefoley2 commented 8 years ago

If the redis cache fills up, we want to drop everything else before sessions.

pefoley2 commented 8 years ago

Take a look at http://redis.io/topics/lru-cache

pefoley2 commented 8 years ago

https://github.com/tjcsl/ion/tree/redis should handle the lack of dropping sessions. I'm not at all sure that it will properly garbage collect and/or cleanup invalid sessions though.

pefoley2 commented 8 years ago

I'm not at all sure this is needed, and even if it is, i'll need to be well tested. Relevant diff is below: diff --git a/intranet/settings/init.py b/intranet/settings/init.py index 7e929e5..d973a6d 100644 --- a/intranet/settings/init.py +++ b/intranet/settings/init.py @@ -330,7 +330,8 @@ if not TESTING: SESSION_REDIS_DB = 0 SESSION_REDIS_PREFIX = VIRTUAL_ENV + ":session"

ovkulkarni commented 6 years ago

@pefoley2 do you know if this is still an issue?

theo-o commented 5 years ago

Haven't seen any redis problems. Closing.