Is it preferred to use a big LruCache
as a singleton globally in the app where all images are cached or is it preferred to use several smaller LruCache
at different places in the app?
Asked
Active
Viewed 610 times
2

Simon Zettervall
- 1,764
- 1
- 15
- 31
-
3It depends on what you need. A big central cache is easier to adjust in size while many small caches may result in cleaner code especially if your caching needs are different. Also non-singleton caches that only exist while (a certain part of) the app is in use can lead to less memory use while (that part of) your app is idle. – zapl Dec 03 '13 at 11:29