Example usage for com.squareup.okhttp Cache getDirectory

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

Introduction

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

Prototype

public File getDirectory() 

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();//from  w  ww .  j  av a 2  s. 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");
}