Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nginx proxy_cache_methods doesn't work #561

Closed
nguyennhatkhang92 opened this issue Sep 7, 2015 · 5 comments
Closed

nginx proxy_cache_methods doesn't work #561

nguyennhatkhang92 opened this issue Sep 7, 2015 · 5 comments

Comments

@nguyennhatkhang92
Copy link

Hi,
I'm try use nginx proxy_cache for caching large file. The following is my idea:

Browser --> Nginx --> Storage

  • Nginx is a function of caching and proxy server.
  • Storage is contain files server.
  • I'm have used ngx.var.upstream_cache_status to determine the status of the HIT file caching but it does'n work, nil value. Then I found this: subrequest proxy cache #125 . I would caching file with only GET method and use HEAD method is checked file caching done(HIT) but proxy_cache_methods doesn't work, proxy_method also. I'm try request from Browser with HEAD, GET method then nginx proxy pass to Storage server with GET methods, I do not understand what the reason.
@agentzh
Copy link
Member

agentzh commented Sep 8, 2015

@nguyennhatkhang92 Because you didn't provide any code nor configuration, I can only guess here. Maybe you read the $upstream_cache_status variable too early or in a wrong context? For example, one should never read this variable in any phase before the header filter phase. In addition, one will not read any valid value in a parent request while the upstream thing is actually in the subrequest.

BTW, I don't understand your HEAD/GET method description.

@agentzh
Copy link
Member

agentzh commented Sep 8, 2015

@nguyennhatkhang92 For such general discussions, please use the openresty-en mailing list instead:

https://openresty.org/#Community

This place is only for issues that are confirmed to be real issues in the module.

@nguyennhatkhang92
Copy link
Author

Sorry, I would use https://openresty.org/#Community. Thanks @agentzh .

@agentzh
Copy link
Member

agentzh commented Feb 16, 2016

Consider it resolved.

@agentzh agentzh closed this as completed Feb 16, 2016
@nguyennhatkhang92
Copy link
Author

Ok, thank Yichun Zhang.

On Wed, Feb 17, 2016 at 12:33 AM, Yichun Zhang notifications@github.com
wrote:

Closed #561 #561.


Reply to this email directly or view it on GitHub
#561 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants