速率限制和缓存
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本页面介绍了使用 Tenor API 时适用的速率限制和缓存政策。
速率限制
Tenor API 密钥的默认速率限制为每秒 1 次 API 请求 (RPS)。超出 1 个 RPS 阈值的 API 请求将失败。
如需提高速率限制,请联系 api@tenor.com。
缓存
您可以缓存 Tenor 的内容网址或 API 响应,以缩短延迟时间并提升用户体验。
如果您的集成缓存了 Tenor 的内容网址,您必须至少每 24 小时刷新一次缓存。
如果您的集成缓存了 Tenor 的 API 响应,我们建议您经常刷新这些记录。Tenor 上针对给定查询的内容排名可以全天调整。
缓存任何 Tenor 内容时,请遵循 Tenor 响应中的 Cache-Control 标头。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-07-11。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2023-07-11。"],[[["The Tenor API has a default rate limit of 1 request per second, and exceeding this limit will result in request failures."],["You can request a rate limit increase by contacting api@tenor.com."],["Caching Tenor content URLs or API responses is encouraged to improve user experience, but ensure content URLs are refreshed at least daily."],["For optimal content relevance, refresh cached API responses regularly, as Tenor's content ranking can change throughout the day."],["Always adhere to the Cache-Control headers provided in Tenor's responses when caching content."]]],["Tenor API usage is limited to 1 request per second, with higher limits available upon request. Caching content URLs is permitted but requires a refresh every 24 hours. Caching API responses is also allowed, though frequent refresh is recommended due to dynamic content ranking. Users should adhere to Cache-Control headers when caching Tenor content. Exceeding the rate limit will result in request failure.\n"]]