I have a DRF API that implements views that allow GET
and POST
calls:
@api_view([
'GET',
'POST',
])
@cache_page(timeout=60 * 10)
def my_view(request):
# do stuff
I noticed that:
GET
requests get cached as expected.POST
requests do NOT get cached at all.
Questions:
Is this intended or am I doing something wrong?
If this is working as intended...how can I get Django to cache
POST
requests as well?