Example usage for com.squareup.okhttp.internal DiskLruCache create

List of usage examples for com.squareup.okhttp.internal DiskLruCache create

Introduction

In this page you can find the example usage for com.squareup.okhttp.internal DiskLruCache create.

Prototype

public static DiskLruCache create(FileSystem fileSystem, File directory, int appVersion, int valueCount,
        long maxSize) 

Source Link

Document

Create a cache which will reside in directory .

Usage

From source file:com.frostwire.android.util.DiskCache.java

License:Open Source License

public DiskCache(File directory, long size) throws IOException {
    this.cache = DiskLruCache.create(FileSystem.SYSTEM, directory, APP_VERSION, VALUE_COUNT, size);
}

From source file:com.linroid.pushapp.module.DataModule.java

License:Apache License

@Provides
@Singleton//w  w w  .  ja  v  a 2 s.  c o  m
DiskLruCache provideDataCache(@DataCacheDir File cacheDir) {
    //10M
    return DiskLruCache.create(FileSystem.SYSTEM, cacheDir, BuildConfig.VERSION_CODE, 1, 1024 * 1024 * 10);
}