With
YII2 the building of the project, after the login, every time the page refresh or go to other pages, will be executed
SELECT * FROM USER WHERE ID = 1 (of course, the ID will be based on the current login user ID changes), so what is the benefit or why? (because I have done before the project is logged on to determine the session, not every time the database query)
Reply content:
With YII2 the building of the project, after the login, every time the page refresh or go to other pages, will be executed SELECT * FROM USER WHERE ID = 1 (of course, the ID will be based on the current login user ID changes), so what is the benefit or why? (because I have done before the project is logged on to determine the session, not every time the database query)
Individuals have been using YII1 before, and the second edition has not been carefully used for projects.
Suppose a user is online, is deleted by the background administrator, at this time his session is still valid, so this user will not be kicked out in real time;