-
-
Save ishanvohra2/dbd984d3f52f3a2937ee48dad8d6613c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Defining a cache of 5 MB size | |
val cacheSize = (5 * 1024 * 1024).toLong() | |
//Initializing instance of Cache class | |
val myCache = Cache(context.cacheDir, cacheSize) | |
//defining okhttpclient instance | |
val okHttpClient = OkHttpClient.Builder() | |
.cache(myCache) | |
.build() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment