()
Clear expired sessions

    This runs code that should normally be run by ``manage.py clearsessions``.
    If Django's internals change, see
    django/contrib/sessions/management/commands/clearsessions.py for the
    current implementation.
Clear expired sessions
Clear expired sessions
def clearsessions():
    """Clear expired sessions

    This runs code that should normally be run by ``manage.py clearsessions``.
    If Django's internals change, see
    django/contrib/sessions/management/commands/clearsessions.py for the
    current implementation."""

    engine = import_module(settings.SESSION_ENGINE)
    engine.SessionStore.clear_expired()
def clearsessions ( ) : engine = import_module ( settings . SESSION_ENGINE ) engine . SessionStore . clear_expired ( )