Cosmos DB supports TTL at both container and item level, allowing automatic deletion of expired data without consuming RUs. Many developers write scheduled cleanup jobs instead of using this built-in feature.
We need a rule that advises:
- Enable TTL on the container (set default or per-item)
- Use -1\ (no expiry) as default with per-item overrides for flexible retention
- Common patterns: session tokens, event logs, temporary caches
Category: \model-\ Data Modeling
Impact: Medium
Suggested file: \skills/cosmosdb-best-practices/rules/model-ttl-expiration.md\
References:
This is a good first issue! Follow the Contributing Guide and use the rule template to get started.
Cosmos DB supports TTL at both container and item level, allowing automatic deletion of expired data without consuming RUs. Many developers write scheduled cleanup jobs instead of using this built-in feature.
We need a rule that advises:
Category: \model-\ Data Modeling
Impact: Medium
Suggested file: \skills/cosmosdb-best-practices/rules/model-ttl-expiration.md\
References:
This is a good first issue! Follow the Contributing Guide and use the rule template to get started.