且构网

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

亚马逊S3缓存控制所有桶

更新时间:2022-11-06 21:41:18

S3并没有一个机制,在现有或未来的对象设置全局桶的元数据。您的code需要设置这个创建对象时。

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/最新/ 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:

问题要求我们推荐或找书,工具,软件库,教程或其他异地资源是题外话堆栈溢出,因为他们往往​​以吸引自以为是的答案和垃圾邮件。

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.

— http://***.com/help/on-topic