You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/03/20 03:11:59 UTC
[GitHub] [incubator-apisix] spacewander opened a new pull request #1305:
chore: improve plugins/proxy-cache
spacewander opened a new pull request #1305: chore: improve plugins/proxy-cache
URL: https://github.com/apache/incubator-apisix/pull/1305
1. unit all the default cache time to 10s.
2. remove repeated `if proxy_cache` check.
3. improve `generate_complex_value`'s performance.
4. better indent.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-apisix] spacewander commented on issue #1305: chore:
improve plugins/proxy-cache
Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #1305: chore: improve plugins/proxy-cache
URL: https://github.com/apache/incubator-apisix/pull/1305#issuecomment-602398464
@agile6v
I see. I figure out that `proxy_no_cache` is skipped when the upstream finalized with 502 or 504. It seems that there is not good pure Lua solution to this problem...
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-apisix] agile6v commented on issue #1305: chore: improve
plugins/proxy-cache
Posted by GitBox <gi...@apache.org>.
agile6v commented on issue #1305: chore: improve plugins/proxy-cache
URL: https://github.com/apache/incubator-apisix/pull/1305#issuecomment-601980037
> BTW, the doc mentions that the `502` and `504` returned by APISIX will be cached. However, the `cache_http_status` is configurable and doesn't contain 5xx code by default. IMHO, if you don't configure to cache 5xx code, you don't need to be afraid of it.
Hi @spacewander The logic of this plugin is implemented by relying on proxy_no_cache directive. But when the upstream is not available, the APISIX return 502 to client and without running proxy_no_cache directive.
Do you have any suggestions?
Thanks.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-apisix] membphis edited a comment on issue #1305: chore:
improve plugins/proxy-cache
Posted by GitBox <gi...@apache.org>.
membphis edited a comment on issue #1305: chore: improve plugins/proxy-cache
URL: https://github.com/apache/incubator-apisix/pull/1305#issuecomment-601540171
you are right, I prefer the blacklist of `ngx.var.request_method`.
I have created an issue right now. https://github.com/apache/incubator-apisix/issues/1307
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-apisix] spacewander commented on issue #1305: chore:
improve plugins/proxy-cache
Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #1305: chore: improve plugins/proxy-cache
URL: https://github.com/apache/incubator-apisix/pull/1305#issuecomment-601507279
BTW, the doc mentions that the `502` and `504` returned by APISIX will be cached. However, the `cache_http_status` is configurable and doesn't contain 5xx code by default. IMHO, if you don't configure to cache 5xx code, you don't need to be afraid of it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-apisix] membphis commented on issue #1305: chore:
improve plugins/proxy-cache
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1305: chore: improve plugins/proxy-cache
URL: https://github.com/apache/incubator-apisix/pull/1305#issuecomment-601533441
nice catch! many thx
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-apisix] membphis commented on issue #1305: chore:
improve plugins/proxy-cache
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1305: chore: improve plugins/proxy-cache
URL: https://github.com/apache/incubator-apisix/pull/1305#issuecomment-601540171
you are right, I prefer the blacklist of `ngx.var.request_method`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-apisix] spacewander commented on issue #1305: chore:
improve plugins/proxy-cache
Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #1305: chore: improve plugins/proxy-cache
URL: https://github.com/apache/incubator-apisix/pull/1305#issuecomment-601536988
@membphis
Just realize one more thing: we might need to blacklist `ngx.var.request_method` (or document them) in the `ngx.var.upstream_cache_key` to make the purge mechanism work. If the cache key contains the request_method which is always `PURGE` during purging, it won't work anymore.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-apisix] membphis merged pull request #1305: chore:
improve plugins/proxy-cache
Posted by GitBox <gi...@apache.org>.
membphis merged pull request #1305: chore: improve plugins/proxy-cache
URL: https://github.com/apache/incubator-apisix/pull/1305
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services