【问题标题】:Does the signed url cache on Google Cloud Storage?签名的 url 是否缓存在 Google Cloud Storage 上?
【发布时间】:2020-05-01 17:38:56
【问题描述】:

https://cloud.google.com/storage/docs/access-control/signed-urls

我想使用签名的网址。

如果我使用这个url结构,我也可以使用缓存系统吗?

我想避免从同一个文件中花费过多的流量。

【问题讨论】:

  • 请问缓存系统到底是什么意思?为什么你认为它行不通?实施有什么问题吗?
  • @vitooh 据我了解;当我们使用签名的 url 时,该 url 会变成这样的东西 storagelink.com/storagepath/content.webm?signedurl = ... 我认为像 storagelink.com/storagepath/content.webm 这样的直接条目将被阻止。我认为这可能会导致缓存问题,因为查询字符串不同。

标签: google-cloud-storage


【解决方案1】:

在我看来这是不可能的。根据这个document cache-control 适用于“可公开访问”的对象。如果我理解正确,这意味着他们必须被允许allUsers

另一边根据Signed URL documentation

生成签名 URL 时,指定用户或服务帐户 必须有足够的许可才能提出请求 签名的 URL 将使

据我了解,这意味着它不允许 allUsers 并且您不能使用缓存。

我希望这种理论思考能对你有所帮助:)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-09-16
    • 1970-01-01
    • 2015-08-30
    • 2016-07-28
    • 2014-01-12
    • 2017-04-03
    相关资源
    最近更新 更多