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

feat(proxy-cache): the cache_zone field in the schema should be optional #2776

Merged
merged 3 commits into from
Nov 18, 2020

Conversation

Firstsawyou
Copy link
Contributor

@Firstsawyou Firstsawyou commented Nov 17, 2020

fix #2767

What this PR does / why we need it:

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible?

@moonming moonming requested review from agile6v, Yiyiyimu, gxthrj and nic-chen and removed request for agile6v November 17, 2020 15:06
apisix/plugins/proxy-cache.lua Show resolved Hide resolved
t/plugin/proxy-cache.t Outdated Show resolved Hide resolved
@@ -31,7 +31,7 @@

| 名称 | 类型 | 必选项 | 默认值 | 有效值 | 描述 |
| ------------------ | -------------- | ------ | ------------------------- | ------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| cache_zone | string | 必须 | | | 指定使用哪个缓存区域,不同的缓存区域可以配置不同的路径,在conf/config.yaml文件中可以预定义使用的缓存区域 |
| cache_zone | string | 可选 | disk_cache_one | | 指定使用哪个缓存区域,不同的缓存区域可以配置不同的路径,在conf/config.yaml文件中可以预定义使用的缓存区域 |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need more details about how to use this config

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will update later.

@@ -31,7 +31,7 @@ The proxy-cache plugin, which provides the ability to cache upstream response da

| Name | Type | Requirement | Default | Valid | Description |
| ------------------ | -------------- | ----------- | ------------------------- | ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| cache_zone | string | required | | | Specify which cache area to use, each cache area can be configured with different paths. In addition, cache areas can be predefined in conf/config.yaml file |
| cache_zone | string | optional | disk_cache_one | | Specify which cache area to use, each cache area can be configured with different paths. In addition, cache areas can be predefined in conf/config.yaml file |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to tell people the cache will be invalid if cache_zone do not match.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this sounds great.

@gxthrj gxthrj self-requested a review November 17, 2020 16:39
@moonming moonming merged commit e4de3d5 into apache:master Nov 18, 2020
@moonming moonming added this to the 2.1 milestone Nov 18, 2020
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

Successfully merging this pull request may close these issues.

DISCUSS(proxy-cache): The cache_zone field in the schema should be optional
5 participants