﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36047	`BaseConnectionHandler.close_all()` doesn't work with async clients	amirreza		"hi
in django.core.cache there is this code:

{{{
caches = CacheHandler()


def close_caches(**kwargs):
    # Some caches need to do a cleanup at the end of a request cycle. If not
    # implemented in a particular backend cache.close() is a no-op.
    caches.close_all()
}}}

where `CacheHandler` is a subclass of `BaseConnectionHandler`
`close_all()` looks like this:

{{{
    def close_all(self):
        for conn in self.all(initialized_only=True):
            conn.close()
}}}


but when an async client is at work, `.close()` doesn't work, it needs to be `await conn.aclose()`

note that in my case (django-valkey) there is no way for async clients to implement a sync method for `close`

p.s: i know django doesn't fully support async cache clients, i open this issue so the problem doesn't get lost"	Bug	new	Core (Cache system)	5.1	Normal				Unreviewed	0	0	0	0	0	0
