Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对 Amazon DAX 的空结果缓存行为有疑问。如果我尝试GetItem使用 Dynamodb 从 DAX 中获取,并且项目结果为空。DAX 会缓存 null 结果以加速获取 null 项吗?
GetItem
是的。如果在 DynamoDB 中找不到项目,DAX 会缓存空标记。
是的,DAX 将缓存否定结果:
DAX 在项目缓存和查询缓存中都支持负缓存条目。当 DAX 在基础 DynamoDB 表中找不到请求的项目时,会出现负缓存条目。DAX 不会生成错误,而是缓存一个空结果并将该结果返回给用户。 负缓存条目将保留在 DAX 项目缓存中,直到其项目 TTL 过期、调用 LRU 或使用 PutItem、UpdateItem 或 DeleteItem 修改项目。
DAX 在项目缓存和查询缓存中都支持负缓存条目。当 DAX 在基础 DynamoDB 表中找不到请求的项目时,会出现负缓存条目。DAX 不会生成错误,而是缓存一个空结果并将该结果返回给用户。
负缓存条目将保留在 DAX 项目缓存中,直到其项目 TTL 过期、调用 LRU 或使用 PutItem、UpdateItem 或 DeleteItem 修改项目。
来自:https ://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.consistency.html#DAX.consistency.negative-caching