as cache without ttl may cause dos problem (depends on developer ) and sometimes may want cache keys invalid after a period of time, i suggest that interface "Cache" should support "put" with TTL , like void put(Object key, @Nullable Object value, Duration ttl);

Comment From: snicoll

No, it won't and this is already covered in the reference guide.

Surfacing such attribute in the higher-level abstraction does not make much sense I am afraid (and TTL values are cache-based, not entry based).