kontent-ai / kontent-ai/java-packages
Detect stale content
- Dominant language
- Java
- Stars
- 17
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
### Motivation
To improve response times Delivery API might provide stale content. Stale means that there is a more recent version, but it will become available later. This information is important for developers who implement caching because stale content should have a short TTL. Developers can inspect the value of the **X-Stale-Content** response header. **1** indicates that content is stale. If the header is not present or it has a different value, content is not stale.
### Proposed solution
Extend response models with information whether content is stale. For consistency it is recommended to use a _has stale content_ bool property with the proper case type.
Contributor guide
Research direction
Start by locating the Delivery API response models and reviewing how response headers are represented. Use the X-Stale-Content rules in this issue as the behavior to verify: expose a consistently named boolean on the relevant models, with true only when the header value is 1.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100