Add disk cache support for Images plugin

Summary:
Tracks images in disk cache. It seems performant even with 500+ images in disk cache. Sidebar displays the local path for an image when that image is selected. Shows total size of images in disk cache. 'Clear Cache' clears the disk cache.

For now we unpack the async cache request in the plugin, should implement a `getSync()` method on `bufferedDiskCache` in the future. For some reason Flipper doesn't work with a blocking call (https://fburl.com/smj0s4li).

Reviewed By: defHLT

Differential Revision: D20001062

fbshipit-source-id: 1e7a7900e9f42d05e3bf30472e57cd643caa5aca
This commit is contained in:
Mathias Fleig Mortensen
2020-03-27 06:29:20 -07:00
committed by Facebook GitHub Bot
parent 5473ba6144
commit 57c573d973
3 changed files with 126 additions and 43 deletions

View File

@@ -71,6 +71,9 @@ android {
testImplementation deps.testRules
testImplementation deps.hamcrest
testImplementation deps.junit
api 'com.parse.bolts:bolts-tasks:1.4.0'
api 'com.parse.bolts:bolts-applinks:1.4.0'
}
}