QUOTE(saboteurs @ Sep 10 2018, 04:29 PM)
Yeah.. wondering why they dont invent something like auto clear cache + data so we as users pay for premium phone dont have everytime manually clear the cache + data
ended up like available storage keep decreasing for nothing .. guess it is a flaw
Oh.. i don;t know system will auto clear after 1-2 months.. hmm...
don't worry~
cached would save your data and battery.
» Click to show Spoiler - click again to hide... «
Android 8.0 (API level 26) gives better guidance and behaviors around cached data. Each app is now given a disk space quota for cached data, as returned by getCacheQuotaBytes(UUID).
When the system needs to free up disk space, it will start by deleting cached files from apps that are the most over their allocated quota. Thus, if you keep your cached data under your allocated quota, your cached files will be some of the last on the system to be cleared when necessary. When the system is deciding what cached files to delete inside your app, it will consider the oldest files first (as determined by modified time).
There are also two new behaviors that you can enable on a per-directory basis to control how the system frees up your cached data:
StorageManager.setCacheBehaviorAtomic() can be used to indicate that a directory and all of its contents should be deleted as a single atomic unit.
setCacheBehaviorTombstone(File, boolean) can be used to indicate that instead of deleting files inside a directory, they should be truncated to be 0 bytes in length, leaving the empty file intact.
Finally, when you need to allocate disk space for large files, consider using the new allocateBytes(FileDescriptor, long) API, which will automatically clear cached files belonging to other apps (as needed) to meet your request. When deciding if the device has enough disk space to hold your new data, call getAllocatableBytes(UUID) instead of using getUsableSpace(), since the former will consider any cached data that the system is willing to clear on your behalf.
QUOTE(Theoutspokenguy @ Sep 10 2018, 04:54 PM)
with so much storage space why are people worrying about cache? not like they can finish 128GB overnight?
on older generation memory chips run slow & limited space,
dual core cpu + 1gb Ram + 8GB build-in without micro-sd slot...
clear cached is only choice
so some people came from old android will having a habit clearing cached most of the time,
untill today i still saw people keep kill background task everytime before lock screen.