-1

I have a ViewPager with three tabs. In one tab is a googleMapFragment and when I add a marker the cache in the App-Info (Settings) rises. Also when I restart the phone the cache is still high. When I switch between the tabs nothing happens to the cache, only when I have added a marker.

Please could anybody tell me what this cache in the App-Info is and why my App caches all the markers added to the map?

user3890967
  • 43
  • 1
  • 6
  • How do you know the cache raised? Post a `screenshot` may help to explain the problem better. – bjiang Apr 17 '15 at 16:23
  • I check the cache section in the app-info in the settings before I start the app and also after closing it. Then the cache raised. – user3890967 Apr 17 '15 at 17:13
  • You don't wanna it raised? I think because os save your map markers in caches, so that user can retrieve it quickly. – bjiang Apr 17 '15 at 17:16
  • Is it a problem that it raises? Is there a limit where the OS decides to clear this cache? – user3890967 Apr 17 '15 at 17:18
  • I don't think it a problem and os don't clear until user does. Take look at [here](http://stackoverflow.com/a/5744208/4186942) – bjiang Apr 17 '15 at 17:22
  • Ok. But if the cache is unlimited there are very much wasted MBs after some time. – user3890967 Apr 17 '15 at 17:27
  • I don't think it will take too much memory. And [here](http://stackoverflow.com/questions/18200811/android-clear-cache-programmatically) to `clear cache programmatically`. – bjiang Apr 17 '15 at 17:31
  • Thanks for your answers! Clear cache programmatically doesn´t work, because the cacheDirectory is empty. I didn´t noticed any other problems except of the high cache. Hope that it will not become to high. One time it was already about 30MB and is still rising. – user3890967 Apr 17 '15 at 17:42

1 Answers1

2

As we discussed above, to sum up:

The cache is basically a temporary storage area for an application while it's running -- it can store things like temporary images downloaded from the internet. Clearing it shouldn't really have much of an effect from a user perspective.

I think because os save your map markers in caches, so that user can retrieve it quickly.

For more details, please refer to here and here.

Community
  • 1
  • 1
bjiang
  • 6,068
  • 2
  • 22
  • 35