Nginx - clear cache on http PUT or POST

I am testing nginx as a reverse proxy cache with REST resources (Spring MVC + ETag). Each GET is cached in order.

Is it possible to flush the nginx cache for a specific resource whenever it is updated via HTTP PUT or HTTP POST?

ps: I also check the varnish cache, but I have the same doubts.

Thank!

+5
source share
1 answer

You did not specify which caching you implement, since there are several options in Nginx.

From your request, I suppose you mean static files, such as images that are uploaded to your site.

  • Nginx . . - - , , Nginx , .

  • FastCGI , . , POST PUT.

  • Memcache , . Memcache Memc, .

, , , , , POST PUT. Nginx , , , . , .

, , - .

0

All Articles