Will laravel's files not be automatically deleted after the session expires?
伊谢尔伦
伊谢尔伦 2017-05-16 16:56:00
0
2
585

I tried it locally and found that the files in storage\framework\sessions will not be automatically deleted after the session expires?

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(2)
巴扎黑

It will be covered, look what I found

https://github.com/laravel/framework/blob/5.1/src/Illuminate/Session/M...

// Here we will see if this request hits the garbage collection
lottery by hitting // the odds needed to perform garbage collection on
any given request. If we do // hit it, we'll call this handler to let
it delete all the expired sessions.

https://github.com/laravel/framework/blob/a423a55ed6601daebcbb75817de6...

The

gc method should destroy all session data older than the given $lifetime UNIX timestamp.

http://laravel-china.org/docs/5.0/extending
https://github.com/laravel/framework/blob/5925ed9bae03c86ea0d6902568ca...
https://github.com/laravel/framework/blob/ a423a55ed6601daebcbb75817de6...

刘奇

You can set the session file storage directory to /tmp,配置项为config/session.phpfiles

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template