首页 > laravel的session过期后文件不会自动删除吗?

laravel的session过期后文件不会自动删除吗?

我本地试了一下,发现session过期后storage\framework\sessions内的文件不会自动删除?


会覆盖,你看我找到了什么

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...

gc 方法应该销毁所有比给定 $lifetime UNIX 时间戳记还旧的 session 数据。

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


可以把session文件存放目录设置为/tmp,配置项为config/session.phpfiles

【热门文章】
【热门文章】