In the previous article in the cache object we mentioned that there are three places where the object data is cached, and here's a detailed:
1 (/data/data/com.xxx.xxx/cache) apply the private cache directory, belong to the internal cache, other applications can not access, generally store smaller data;
2 (/mnt/sdcard/android/data/com.xxx.xxx/cache), apply the private external cache directory.
Custom directories under 3SD cards, shared.
To implement clear caching, first you need to know:
1 whether the application adopts the cache strategy;
2 What is the cached data and where is it cached?
The 3 cache size calculation is actually the sum of the size of the files you cache;
4 Clear the cached directory, directly trace to the directory, the directory of the files are all deleted.
In the client source code, the cleanup cache is encapsulated in the Datacleanmanager class, which provides cleanup of internal caches, external private caches, externally exposed caches, internal databases, and data in Sharedpreference.
Open source China Oschina Android Client Source Analysis (12) Clean cache