Open hufman opened 2 years ago
SpotifyWebApi's SpotifyApiOptions has useCache=true
by default, hmmmm
Did we ever get around to this? If not, I'd be interested to know which exact API call we're seeing a lot of so I can take a stab at this.
The biggest API calls currently are /v1/me/tracks and /v1/playlists/<>/tracks. All of the API accesses should be within the SpotifyWebApi class, probably webApi?.library?.getSavedTracks
and webApi?.playlists?.getPlaylistTracks
. I'm not sure if there's a cheap way to check the current version of the playlist to invalidate any cache, or perhaps just cheat a little and assume the playlist stays the same between app restarts as long as the context url stays the same.
The Spotify Web API is used by some of the new features, and it would be nifty to add a little bit of memoization to reduce the API call count.![image](https://user-images.githubusercontent.com/1592375/137060151-6d1b0968-600f-4abd-a127-7029418c60c6.png)