My laravel website session is still stored in /storage/framework/sessions. after logout.
I try to use Session::flush but its not working
how I can delete these sessions.
My laravel website session is still stored in /storage/framework/sessions. after logout.
I try to use Session::flush but its not working
how I can delete these sessions.
Old session files will be deleted only after the Session garbage collector is called, the function is gc()
.
This function has a probability to be called on every request, you can control the chances it will run with the session.lottery
config value.
But do not worry, even if the session files are still present they are invalidated after logout, only deletion occur with the gc()
function above.
The same is true for database session records.
Nor Session::flush()
nor Session::regenerate(true)
will delete old session file.