public interface CacheRequest
An interface for writing a response to the cache.
Implementations of this interface provide a Sink to which the response body can be written.
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Method Summary
-
Method Details
-
body
Returns a sink that can be used to write the response body to the cache.- Returns:
- The sink for the response body.
- Throws:
IOException- if an I/O error occurs.
-
abort
void abort()Aborts this cache request.This should be called when the response body cannot be written, for example, due to a network error.
-