B
B
banny_name2015-10-11 09:42:24
PHP
banny_name, 2015-10-11 09:42:24

How to properly remove sessions from a directory?

Tell me how to delete the session file correctly (I save it in a directory, the lifetime is a month).
When a user logs out, it is necessary to delete the session file, how can this be done more correctly?
Leaving and waiting for the garbage collector to come is nonsense because everyone will do this several times and inodes will end and there will be tons of sessions.
How to properly delete the session file?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Pavlenko, 2015-10-11
@Akdmeh

1) do not store authorization information in sessions - cookies with access_token are suitable for this;
2) write your own implementation of sessions (based on the database)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question