Changes between Initial Version and Version 3 of Ticket #36506
- Timestamp:
- Jul 14, 2025, 4:59:56 PM (7 weeks ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #36506
- Property Type Uncategorized → Bug
- Property Owner set to
- Property Status new → assigned
-
Ticket #36506 – Description
initial v3 1 1 Hello, 2 2 3 We've been using Redis as the session storage for our cache backend. To clean up old sessions, we run the "python manage.py clearsessions" management command. This command internally calls the clear_expired method on the associated SessionStore. If clear_expired raises a NotImplementedError, the command catches it and raises a CommandError, indicating that the session backend doesn't support session cleanup. This behavior makes sense. https://github.com/django/django/blob/main/django/contrib/sessions/management/commands/clearsessions.py3 We've been using Redis as cache backend for session storage. To clean up old sessions, we run the "python manage.py clearsessions" management command. This command internally calls the clear_expired method on the associated SessionStore. If clear_expired raises a NotImplementedError, the command catches it and raises a CommandError, indicating that the session backend doesn't support session cleanup. This behavior makes sense. https://github.com/django/django/blob/main/django/contrib/sessions/management/commands/clearsessions.py 4 4 5 5 However, in the case of the cache backend, the clear_expired method is currently just an empty function. https://github.com/django/django/blob/main/django/contrib/sessions/backends/cache.py#L140