Cached info expiration policy
Figure out a cache expiration policy for the more volatile parts of the application. These include things like:
- Playlists list
- Playlist songs
This technique should be used instead of deleting stuff from the cache so that we don't nuke things in offline mode when we don't want to.
My thought here is to wrap each entity that may expire in a tuple of (expiration: Optional[datetime], entity: Any)
. Then, all of the CacheManager
functions need to be adapted to check expiration. If expiration
is None
, then it never expires.
Edited by Sumner Evans