G
G
grabbee2020-08-26 22:03:49
Nginx
grabbee, 2020-08-26 22:03:49

What is the correct header to flush an entry from the NGINX cache?

The request from the backend receives a collection of data. POST creates a new entry in this array and returns 201 - Created. But the old data is not flushed from the cache, and NGINX returns the old list without the new entry. Probably missing some headers from the backend. Help me understand how this should happen correctly so that the old data from the NGINX cache and the browser is not taken?

The problem is that POST and PUT return a new version of the resource. And if it were cached again fastcgi_cache_key "$scheme:$host:$request_uri"; it would probably be ideal.

But the backend puts the header cache-control: no-cache, private on the response and nothing is cached
Symfony, api-platform

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question