且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

适用于所有存储桶的 Amazon S3 缓存控制

更新时间:2022-11-06 22:15:28

S3 没有在现有或未来对象上设置全局存储桶元数据的机制.您的代码需要在创建对象时设置此项.

S3 does not have a mechanism for setting global bucket metadata on existing or future objects. Your code needs to set this when the objects are created.

您可以使用放置/复制"将其添加到现有对象中.API 的操作,允许您使用修改后的元数据将对象复制到自身上,而无需实际下载和重新上传对象.

You can add it to existing objects using the "put/copy" operation of the API, which allows you to copy an object onto itself, with modified metadata, without actually downloading and re-uploading the object.

http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectCOPY.html

关于开源解决方案,可能有,但他们可以使用的唯一可能机制是执行相同的操作 - 遍历存储桶并通过 API 更新每个对象的元数据.不过无论如何:

Regarding open-source solutions, there might be, but the only possible mechanism they could use would be to perform the same actions -- iterating through the bucket and updating each object's metadata via the API. In any event, though:

要求我们推荐或查找书籍、工具、软件库、教程或其他场外资源的问题对于 Stack Overflow 来说是无关紧要的,因为它们往往会吸引自以为是的答案和垃圾邮件.

Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam.

https://***.com/help/on-topic