Opened 3 months ago

Last modified 3 months ago

#36560 closed Cleanup/optimization

When the Cache-Control header is set to no-store, the response is cached. — at Initial Version

Reported by: mengxun Owned by:
Component: HTTP handling Version: 5.2
Severity: Normal Keywords: cache
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

from django.http import HttpResponse
import datetime

def cache_demo(request):
    resp = HttpResponse(f"Current content at {datetime.datetime.now()}")
    resp["Cache-Control"] = "no-store"
    return resp

Based on the example above, when the Cache-Control header is set to no-store, the response content is still cached.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top