Open EduardsE opened 1 year ago
It doesn't - however there's a really simple way to implement it so I'll try cook up a PR :)
So, I did some experimentation with this over the weekend and put together an implementation of this and... well... honestly it's probably not worth the effort.
There are a grand total of absolutely no etags ever returned from the API, there's a bunch of cache-control headers with hints to cache results for ~2 minutes on 3-4 of the APIs (mostly search), and everything else explicitly returns cache-control never, or max-age of 0.
Feels like something that would help specifically only the case of revisiting a prior search result set in a 2-minute window :/
How about users playlists? I feel like that can be cached for significant amount of time since it doesn't change every day. And that endpoint returns etag. At least for my usecase, I'd basically have to skip using this lib for that endpoint and do a regular fetch + also would have to deal with token refresh on catch myself. Bit of a pain to workaround.
Spotify documentation mentions "If the response contains an ETag, set the If-None-Match request header to the ETag value." to help with faster response times if no data has changed for requests response. Is it possible to set/receive this value with this library?