Auth auth = Auth.create ("ak", "sk");
CdnManager c = new CdnManager (auth);
//待刷新的资源列表
String[] dirs = new String[] {
"http://xxxx/douyin.apk"
};
try {
//单次方法调用刷新的目录不可以超过10个,另外刷新目录权限需要联系技术支持开通
CdnResult.RefreshResult result = c.refreshUrls (dirs);
System.out.println ("code: {}"+ result.code);
//获取其他的回复内容
} catch (QiniuException e) {
log.info ("刷新CDN失败: response: {}", e.response.toString ());
}
System.out.println ("刷新CDN成功");
七牛云刷新CDN缓存
最新推荐文章于 2023-11-22 13:26:22 发布