These are my URIs
/posts.php?action=get_single_posts /posts.php?action=search /posts.php?action=get_all_posts
I need 2 separated location block for these URIs in Nginx because I want to cache first one and not cache the second one. How can I do that?
Additional: Also have question about "get_all_posts" request. Users are ganna fetch this URL. Each of them has unique "user_id" in their headers. Also each user should be able to get data based on his user_id (only get posts if this user_id is the owner of the post). Example:
User by user_id 10 should get posts A,B User by user_id 11 should get posts C,D
If I pass them to upstream, they will get different data based on their user_id and is correct. I want to cache their response individually based on their headers['user_id'] field for request "/posts.php?action=get_all_posts". If I cache this request universally, every user will get same data and its not right on this case. How can I do that?