Example usage for com.squareup.okhttp CacheControl mustRevalidate

List of usage examples for com.squareup.okhttp CacheControl mustRevalidate

Introduction

In this page you can find the example usage for com.squareup.okhttp CacheControl mustRevalidate.

Prototype

boolean mustRevalidate

To view the source code for com.squareup.okhttp CacheControl mustRevalidate.

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();
}