kontent-ai/java-packages

Detect stale content

alesk-kentico opened this issue · 0 comments

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.