Example usage for com.squareup.okhttp Response cacheControl

List of usage examples for com.squareup.okhttp Response cacheControl

Introduction

In this page you can find the example usage for com.squareup.okhttp Response cacheControl.

Prototype

CacheControl cacheControl

To view the source code for com.squareup.okhttp Response cacheControl.

Click Source Link

Usage

From source file:it.http.HttpHeadersTest.java

License:Open Source License

private static void assertCacheInBrowser(Response httpResponse) {
    CacheControl cacheControl = httpResponse.cacheControl();
    assertThat(cacheControl.mustRevalidate()).isFalse();
    assertThat(cacheControl.noCache()).isFalse();
    assertThat(cacheControl.noStore()).isFalse();
}

From source file:it.http.HttpHeadersTest.java

License:Open Source License

private static void assertNoCacheInBrowser(Response httpResponse) {
    CacheControl cacheControl = httpResponse.cacheControl();
    assertThat(cacheControl.mustRevalidate()).isTrue();
    assertThat(cacheControl.noCache()).isTrue();
    assertThat(cacheControl.noStore()).isTrue();
}