Skip to content

Instantly share code, notes, and snippets.

Created August 28, 2015 12:33
What would you like to do?
dagger cache
@Provides @CacheDir File provideCacheDir(Context context) {
File f = Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())
? context.getExternalCacheDir()
: context.getCacheDir();
if (f != null) {
return f;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment