Skip to content

Commit 1a9b1dd

Browse files
committed
Add inheritance order comment to PublicCacheMixin
Add comment about inheritance order to PublicCacheMixin
1 parent f90d523 commit 1a9b1dd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

django/thunderstore/api/utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ class PublicCacheMixin:
2929
"""
3030
A mixin for caching public API endpoints.
3131
32+
IMPORTANT: Must be before generic DRF view base classes in the inheritance list.
33+
34+
Example:
35+
class ProductListView(PublicCacheMixin, ListAPIView):
36+
3237
1. Caching: Applies 'public' Cache-Control headers to the response.
3338
2. Security: Explicitly clears 'authentication_classes' and 'permission_classes'
3439
to override global DRF settings in settings.py. This ensures the endpoint is strictly

0 commit comments

Comments
 (0)