DP-420 · Question #58
One of the team members has recently joined the team and wants to manually adjust the time for which the items will remain in the cache. He asks you for help about which property from the…
The correct answer is C. MaxIntegratedCacheStaleness. The correct answer is C: MaxIntegratedCacheStaleness. Azure Cosmos DB's integrated cache allows items and query results to be served from memory. The MaxIntegratedCacheStaleness property on ItemRequestOptions (and QueryRequestOptions) controls the maximum acceptable age…
Question
One of the team members has recently joined the team and wants to manually adjust the time for which the items will remain in the cache. He asks you for help about which property from the ItemRequestOptions class should he configure. What would you suggest?
Options
- AConsistencyLevel
- BSessionToken
- CMaxIntegratedCacheStaleness
- DNone of these
How the community answered
(66 responses)- A5% (3)
- C94% (62)
- D2% (1)
Explanation
The correct answer is C: MaxIntegratedCacheStaleness. Azure Cosmos DB's integrated cache allows items and query results to be served from memory. The MaxIntegratedCacheStaleness property on ItemRequestOptions (and QueryRequestOptions) controls the maximum acceptable age (staleness) of a cached item before a fresh backend read is forced. By setting this property, a developer can fine-tune the trade-off between cache hit rate (lower RU cost) and data freshness. Option A (ConsistencyLevel) affects read consistency guarantees across replicas. Option B (SessionToken) is used for session consistency tracking. Neither of those controls cache duration.
Topics
Community Discussion
No community discussion yet for this question.