我试图重写
def run_process(self, resource_generator, chain_signature):
for resources in resource_generator:
chain_signature(resources)
作为
request = request.newBuilder()
.header("Cache-Control", "public, max-age=" + 60)
.build();
但它并不等效,因为CacheControl cacheControl =
new CacheControl.Builder()
.maxAge(1, TimeUnit.MINUTES)
.noCache()
.build();
request.newBuilder()
.cacheControl(cacheControl)
.build();
指令不在public
标题中。如何使用Cache-Control
?