eguven 3fbfe29d27 Modify CacheUtil.cache() for polling counters
Getting active status of caching is needed to display on UI. Instead of a listener interface polling was chosen because of simplicity and better suits to UI refreshing.

CachingCounters.downloadedBytes was updated after whole data is downloaded. Now it's updated for each read into buffer. Buffer length defines how finer these updates are.

CachingCounters.totalBytes is added so UI can display a progress bar.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160142048
2017-06-26 17:07:56 +01:00
..