-
Notifications
You must be signed in to change notification settings - Fork 40
Description
- Create a SessionManager and a CacheManager.
egrep -r SESSION|GLOBALS *- Go through every single line of output and fix it so it is either using the SessionManager, the CacheManager, or neither.
- Create a MiniAdmin link to "Clear Session" and another link to "Clear Cache".
The rule of thumb for session vs cache is like so: if it is something that needs to persist for a SPECIFIC user, put it on the session. No, wait, let me be more clear than that. Put only some kind of reference to an object on the session, like the User ID of who is logged in or some such.
If it's something that CAN persist for ALL users, put it on whatever cache is selected. Put the User ID on the session, but put that user object on the cache.
The good news is that we can use the static Layout and Current_User classes to act as a facade to the new interface pretty easily, so that's nice.
Regarding the user interface: even though "Clear Session" should log me out, it may not be a bad idea to put my user ID back on the session after it is reset. But I think that the User ID is the one magic thing that does not get cleared off of the session - anything else should know how to reload itself if necessary. Maybe I am wrong about that.
┆Issue is synchronized with this Asana task