亚马逊cloudfront:查找缓存的所有资产
我需要编写一个任务,以便在部署时从我们的 Cloudfront 存储桶中删除所有资产。
目前,我不会在版本存储库中跟踪动态创建的资产(特别是通过 sass 创建的 css 文件),因此我不可能说“将此提交与该提交进行比较,并给我所有已更改的 css 文件” /c 这些是我们需要使其无效的文件”。
鉴于此,我想我只需要在部署时使给定类型的所有资产(例如 css)无效即可。但是,我不知道如何检索云前端已缓存的任何/所有资产。
有人知道如何向 cloudfront 询问他们缓存在我的存储桶中的所有活动资产吗?或者更好的是,它们已缓存的给定类型(css、js、png)的所有资源?
I need to write a task to remove all assets from our cloudfront bucket when we deploy.
Currently, I do not track dynamically created assets (specifically our css files which are created via sass) in my version repository so it is impossible for me to say "diff this commit with that commit and give me all the css files that have changed b/c those are the files we need to invalidate".
Given this, I am thinking I just need to invalidate all assets of a given type, say css, whenever I deploy. However, I do not see how it is I can retrieve any/all assets cloudfront has cached.
Does anybody know how to ask cloudfront for all active assets which they have cached in my bucket? Or even better, all assets of a given type (css, js, png) that they have cached?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论