Example usage for com.squareup.okhttp Cache getMaxSize

List of usage examples for com.squareup.okhttp Cache getMaxSize

Introduction

In this page you can find the example usage for com.squareup.okhttp Cache getMaxSize.

Prototype

public long getMaxSize() 

Source Link

Usage

From source file:com.raskasa.oksolr.SolrClientTest.java

License:Apache License

@Test
public void testInstallCache() throws Exception {
    SolrClient client = new SolrClient();
    client.installCache();//  w  w  w .  jav  a 2s  . c om
    Cache cache = client.getCache();

    assertThat(cache.getMaxSize()).isEqualTo(50 * 1024 * 1024); // 50 MiB
    assertThat(cache.getDirectory().toString())
            .isEqualTo(System.getProperty("user.home") + File.separator + "oksolr" + File.separator + "http");
}