The cache folder you are talking about is the data/data/your_package/cache directory folder? If so, this cache directory will not disappear automatically. There are two situations when it disappears. One is that the user actively uses the clear cache function (including the manual clear cache function written by programmers). The other is that the system detects that the memory is not enough and will enable it. The underlying cache function cleans the cache of recently inactive applications. However, in both cases, only the contents of the cache file directory are operated, and the entire cache directory folder is not cleared. It has nothing to do with which version of gradle your application is compiled with.
The cache folder you are talking about is the data/data/your_package/cache directory folder? If so, this cache directory will not disappear automatically. There are two situations when it disappears. One is that the user actively uses the clear cache function (including the manual clear cache function written by programmers). The other is that the system detects that the memory is not enough and will enable it. The underlying cache function cleans the cache of recently inactive applications. However, in both cases, only the contents of the cache file directory are operated, and the entire cache directory folder is not cleared. It has nothing to do with which version of gradle your application is compiled with.