title: Exo-Player 2.10.1 says SimpleCache(File cacheDir, CacheEvictor evictor) deprecated
body: <p>I am using <code>ExoPlayer</code> to play videos from online server. So, for better to save more internet or data for replay video I'm just caching all videos to <code>Cache directory</code>. But problem its saying that deprecated <code>constructor</code> of <code>SimpleCache</code>.</p>
  
  <p>See my code:</p>
  
  <pre><code>private var sDownloadCache: SimpleCache? = null
  
  fun getInstance(mContext: Context): SimpleCache {
      val cacheEvictor = LeastRecentlyUsedCacheEvictor((100 * 1024 * 1024).toLong())
  
      if (sDownloadCache == null)
          sDownloadCache = SimpleCache(File(mContext.getCacheDir(), "media"),
                  cacheEvictor)
      return sDownloadCache!!
  }
  </code></pre>
  
  <p>In this code compiler is just warn me <strong>constructor SimpleCache(File!, CacheEvictor!) is deprecated. Deprecated in Java</strong>. So, after that I'm trying to find way in file of <code>SimpleCache.java</code> there is a way to use <code>SimpleCache</code> now is..</p>
  
  <pre><code>SimpleCache(File cacheDir, CacheEvictor evictor, DatabaseProvider databaseProvider)
  </code></pre>
  
  <p>And its new to me. So, my problem is how to use this new constructor instead of old deprecated one? Is there way to pass <code>DatabaseProvider</code>? If yes then how or from what?</p>
  
  <p>I'm using <code>ExoPlayer</code> libraries:</p>
  
  <pre><code>implementation 'com.google.android.exoplayer:exoplayer:2.10.1'
  implementation 'com.google.android.exoplayer:exoplayer-ui:2.10.1'
  </code></pre>
  
  <p>And its because this version provides easy to create <code>ExoPlayerFactory</code> <code>instance</code> and <code>build ProgressiveMediaSource</code>.</p>