A portable media device intelligently caches media based on device state.
The portable media device has a hard disk memory to store the media
(e.g., music, videos, movies, games, etc.) and a cache memory. When the
device is in a state of user interaction (e.g., the user is navigating a
menu or playlist, the user interface is unlocked, and so forth), the
portable media device caches many snippets of different media items in a
playlist. This enables the device to respond quickly to user input and
provide instant playback as the user navigates items in the playlist.
Conversely, when the device is in a playback state (e.g., the user has
ceased interacting with the device for a period of time, or has locked
the user interface), the portable media device caches as much contiguous
data from the selected media item in the playlist as possible.