When I POST a model to a ModelViewSet and then retrieve all objects via a GET afterwards I get a stale cached response without the new POSTed object. Does django-cassandra-engine perform any caching? If I restart the server however it brings the latest data correctly.
I checked Cassandra logs and I found no queries are made when the cached response is returned. I'm actually not sure whether this is because django-cassandra-engine or the driver or DRF. Any pointers would be helpful.
I'm already using never_cache in the ModelViewSet
class SensorReadingViewSet(viewsets.ModelViewSet):
"""
API endpoint that allows sensor readings to be viewed or edited.
"""
queryset = SensorReading.objects.all()
serializer_class = SensorReadingSerializer
@method_decorator(never_cache)
def list(self, request, *args, **kwargs):
return super().list(request, *args, **kwargs)
When I
POST
a model to aModelViewSet
and then retrieve all objects via aGET
afterwards I get a stale cached response without the newPOST
ed object. Doesdjango-cassandra-engine
perform any caching? If I restart the server however it brings the latest data correctly.I checked Cassandra logs and I found no queries are made when the cached response is returned. I'm actually not sure whether this is because
django-cassandra-engine
or the driver or DRF. Any pointers would be helpful.I'm already using
never_cache
in theModelViewSet