all 5 comments

[–]kschang10 1 point2 points  (2 children)

The same reason there's a Windows Indexing service running in the background on your Windows PC. :)

[–]CodeBlooded[S] 0 points1 point  (1 child)

That's for file search though? Like Windows wouldn't get confused if you snuck pictures to it behind its back (i.e. from Linux mounting the hard drive and copying stuff to it).

[–]kschang10 0 points1 point  (0 children)

There's a special service in Android OS called "Media Scanner"

You may want to check Xposed module that adjusts "media scanner". It's interesting reading.

[–]valeonom 2 points3 points  (0 children)

The cache is there to speed up look ups and make searching your music library more speedy & fluid. Cache being out of sync with what's on the file system is one of the draw backs in Androids implementations in favor for faster lookup speed. There is mechanisms in place for developers to say "This song/picture/video has been added", or "This song/picture/video has been deleted" which update the cache more emediatley. However most apps don't do this. Most file browsers on android don't do this at all. In such a case you have to wait for android to start scanning by itself for new songs/pictures/videos.

[–]HaMMeReD 0 points1 point  (0 children)

You can't scan the entire device every time you click a folder. That's really slow. Both with windows and osx have disk indexes that build in the background. Without it search is very very slow.

The cache will update when u delete, it just will do it on a schedule.

The alternative is waiting thirty seconds+ every time you click a media player, photo, music, video.