Should I handle junk session?

when a user closes his browser, he usually lost the cookie that marks the session. but the file on the server is not deleted and remains there, useless.

Do I need to handle this? or is it a server business?

+3
source share
2 answers

This is a server business. PHP has a garbage collector mechanism for them. See session.gc_probability , session.gc_divisor, and session.gc_maxlifetime configuration options.

+4
source

Nope. You should never care about this - this is the php internals business.

+2
source

Source: https://habr.com/ru/post/1762572/


All Articles