User Controls
ATTN: Lanny
-
2019-05-04 at 10:51 AM UTCI'm guessing he threw the "banned" tag on his title to be funny
-
2019-05-04 at 10:59 AM UTCIt's just because he's hasty and sloppy and impulsive and doesn't really think anything out.
-
2019-05-04 at 11:05 AM UTC
-
2019-05-04 at 11:05 AM UTC
-
2019-05-04 at 11:27 AM UTC
-
2019-05-04 at 11:42 AM UTCit's clearly an error
-
2019-05-04 at 12:05 PM UTCInstead of just deleting the ban, he should have first closed the ban, by adjusting the end date (restoring the usertitle), and then deleted the ban from the ban list.
-
2019-05-04 at 4:24 PM UTC
-
2019-05-04 at 4:25 PM UTC
-
2019-05-04 at 4:29 PM UTC
-
2019-05-04 at 6:41 PM UTC
Originally posted by whoami I would guess lanny forgot to add a function to change the user title back when a ban is reversed. Probably hasn't had to take said action before. Could verify but too lazy.
Yeah, pretty much. The "(banned)" doesn't get written to the db, there's presentation logic for building the user title strings based on things like being banned or having a custom username. But it has to touch the DB to do which makes it too slow to do 20-50 times per page so the UT strings get cached in redis for like a couple days I think. We normally invalidate it on any change to the username but deleting a ban goes through the admin interface so normal app logic like cache invalidation never happens and deleting a ban leaves you in a consistent state in the db but with the "(banned)" thing until your chached usertitle expires. -
2019-05-04 at 6:48 PM UTCYou started using redis?
-
2019-05-04 at 6:53 PM UTCyeah, through django's cache adapter. The locmem backend is fast but when you're running multiple processes (like we do here) you can't do invalidation and have to maintain N separate caches
-
2019-05-05 at 1:12 AM UTC...BAN