Caching is now available
Use cases
If your program is very dependent on repetitive simple GET requests like `get_track` or `get_album`, this feature is for you!
You can use that database for other projects since all the data are stored in plain JSON from Spotify.
How does it work?
Instead of having to call the Spotify API every single time (increasing latency), it searches first in MongoDB's collection and sees if there's an endpoint matching the current request. If so, it returns that item, and the entire request is completed in **less than 0.1 seconds**.
How to enable it?
1. Install MongoDB
2. Create a database and a collection called `spotipy2`
3. Set the [`mongodb_uri`](https://docs.mongodb.com/manual/reference/connection-string/) parameter (Make sure to add the default database!)
4. *(Optional)* Add an ascending index for the `_endpoint` field
5. You're done!