The invalidate function invalidates the session ID for the current request, effectively destroying the session.
invalidate
session.invalidate();
session. invalidate ( )
void