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

没有封装 Purge 缓存刷新接口 #22

Closed
chmis8000 opened this issue Jun 16, 2017 · 7 comments
Closed

没有封装 Purge 缓存刷新接口 #22

chmis8000 opened this issue Jun 16, 2017 · 7 comments
Milestone

Comments

@chmis8000
Copy link

如题,没有封装 Purge 缓存刷新接口

@polym
Copy link
Collaborator

polym commented Jun 16, 2017

好的,我抽空支持下

@polym
Copy link
Collaborator

polym commented Jun 19, 2017

PR #23,等还有一个功能做完一起发布。如果急用的话,可以自行编译一下。

@polym polym added this to the v0.2.2 milestone Jun 19, 2017
@chmis8000
Copy link
Author

@polym 我两种用法都测试了,没有任何错误,但又拍云后台 刷新 里面的 操作记录,没有记录,是否正常?
方法1:
upx.exe purge http://downh.xxxx.cn/zzcs/update.ini.7z
方法2:
upx.exe purge --list purge.txt
purge.txt文件内容是:
http://downh.xxxx.cn/zzcs/update.ini.7z

@polym
Copy link
Collaborator

polym commented Jun 20, 2017

因为是直接走 API 的,所以管理后台那边不会显示的。

@chmis8000
Copy link
Author

@polym 麻烦再问2个相关问题

  1. 是否purge 若有汉字,是否必须 URI转码?
    2.官网 刷新 里面,我故意输错url,发现它也能刷新成功,所以,是否真正成功不知道?

@polym
Copy link
Collaborator

polym commented Jun 21, 2017

@chmis8000

  1. 是否 purge 若有汉字,是否必须 URI转码?

现在 upx 这边对 Escape 后的 URI 暂时还无法执行刷新,这个我修复下。
另,问了下管理后台的同事,管理后台里提交刷新是两种方式都支持的。

2.官网 刷新 里面,我故意输错url,发现它也能刷新成功,所以,是否真正成功不知道?

只要是你绑定域名下的 URL,不管文件是否存在,只要 CDN 所有节点都执行了刷新,就认为处理成功了。

情况是这样的,可以考虑以下 2 种场景,无法依据文件是否存在而发起刷新的:

  • 存储中有文件,但是由于文件过冷,CDN 节点并没有缓存。
  • 存储中文件已经删除,但是 CDN 节点缓存由于刷新有延迟,仍然存在。

所以我们现在的刷新,只管向 CDN 节点发送刷新请求,不区分文件是否存在的。

@polym
Copy link
Collaborator

polym commented Jun 21, 2017

@chmis8000 新版本已经发布

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