CacheSessionHandler
class CacheSessionHandler extends AbstractSessionHandler (View source)
Session save handler that stores session data in an in a PSR-16 cache.
Methods
Check the PHP session ID i.e. PHPSESSID is valid against the default PHP session ID format.
Details
protected int
getLifetime()
Get the session lifetime in seconds.
Returns the cookie lifetime if it's non-zero, otherwise returns the garbage collection lifetime.
protected void
checkSessionID(string $id)
Check the PHP session ID i.e. PHPSESSID is valid against the default PHP session ID format.
This is a security measure to prevent people from injecting invalid session IDs in the request.
This only needs to be called on read() We do not need to call this on write(), destroy(), updateTimestamp(), or validateId() as those methods are only called for session IDs that have already been accepted by PHP.
__construct(CacheInterface $cache)
No description
bool
open(string $path, string $name)
No description
bool
close()
No description
bool
destroy(string $id)
No description
int|false
gc(int $max_lifetime)
No description
string|false
read(string $id)
No description
bool
write(string $id, string $data)
No description
bool
validateId(string $id)
No description
bool
updateTimestamp(string $id, string $data)
No description