D
D
demudrol2017-04-25 15:43:50
Nginx
demudrol, 2017-04-25 15:43:50

How to cache only one method in nginx?

I want to cache successful responses from the server in nginx using only one method. Methods are specified in $request_uri.
In theory, you should use the if construct and direct it to the internal location where everything has already been described for caching and proxy_pass

if ( $request_uri ~ "^\/api\/info") {
    }

I'm just not sure if this is the correct approach.
How can I cache a separate request?

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