cloud/src/main/java/com/adamg/materialtemplate/cloud/module/OkHttpModule.java
static OkHttpClient createOkHttpClient(final Context ctx) {
        OkHttpClient client = new OkHttpClient();

        // Install an HTTP cache in the application cache directory.
        try {
            final File cacheDir = new File(ctx.getCacheDir(), "https");
            final Cache cache = new Cache(cacheDir, DISK_CACHE_SIZE);
            client.setCache(cache);
        } catch (final IOException e) {
            // Log the error
            Log.e(TAG, "Unable to install disk cache." + Log.getStackTraceString(e));
        }

        return client;
    }
/**
     * Creates a default OkHttp client with a disk cache of 10 MB
     *
     * @param ctx a reference to the Client's {@link Context}
     * @return the instance of the OkHttp Client used as the transport layer for API calls
     */
Creates a default OkHttp client with a disk cache of 10 MB
@param ctx a reference to the Client's  Context
@return the instance of the OkHttp Client used as the transport layer for API calls
Creates a default OkHttp client with a disk cache of 10 MB @param ctx a reference to the Client ' s Context @return the instance of the OkHttp Client used as the transport layer for API calls
static OkHttpClient createOkHttpClient(final Context ctx) {
        OkHttpClient client = new OkHttpClient();
        try {
            final File cacheDir = new File(ctx.getCacheDir(), "https");
            final Cache cache = new Cache(cacheDir, DISK_CACHE_SIZE);
            client.setCache(cache);
        } catch (final IOException e) {
            Log.e(TAG, "Unable to install disk cache." + Log.getStackTraceString(e));
        }
        return client;
    }
static OkHttpClient createOkHttpClient ( final Context ctx ) { OkHttpClient client = new OkHttpClient ( ) ; try { final File cacheDir = new File ( ctx . getCacheDir ( ) , "https" ) ; final Cache cache = new Cache ( cacheDir , DISK_CACHE_SIZE ) ; client . setCache ( cache ) ; } catch ( final IOException e ) { Log . e ( TAG , "Unable to install disk cache." + Log . getStackTraceString ( e ) ) ; } return client ; }
Creates a default OkHttp client with a disk cache of 10 MB
 @param ctx a reference to the Client's {@link Context}
 @return the instance of the OkHttp Client used as the transport layer for API calls
Creates a default OkHttp client with a disk cache of 10 MB @param ctx a reference to the Client ' s { @link Context } @return the instance of the OkHttp Client used as the transport layer for API calls
// Install an HTTP cache in the application cache directory. // Log the error