auser
Retrieves the user associated with the request asynchronously, caching the result on the request object to prevent redundant lookups.
def auser(
request: HttpRequest
) - > User
Asynchronously retrieves and caches the user associated with the current request to prevent redundant authentication lookups.
Parameters
| Name | Type | Description |
|---|---|---|
| request | HttpRequest | The incoming HTTP request object where the authenticated user is cached. |
Returns
| Type | Description |
|---|---|
User | The authenticated user object associated with the request, retrieved from the authentication backend or the local request cache. |