gphotosuploader / google-photos-api-client-go

Google Photos API client for your Go apps
https://pkg.go.dev/github.com/gphotosuploader/google-photos-api-client-go/v3
MIT License
41 stars 20 forks source link

Remove cache from this module #86

Closed pacoorozco closed 1 year ago

pacoorozco commented 1 year ago

Is your feature request related to a problem? Please describe. The v2.x of the module was offering an Album's cache to reduce the number of calls to the Google Photos API.

Example: When you were trying to GetByTitle several times, we were expecting to reuse previous List calls to eventually get the album without sending a new request.

Over the time, the Album's cache has become ineffective, and it's strongly recommend to implement this kind of cache on the client side. The client has more context to set what to cache and how long. The gphotos-uploader-cli is already implementing it this way, and reducing the amount of request by 20x.

Describe the solution you'd like Remove the CachedAlbumsService and create a raw service wrapping the Google Photos client.

The contract should be kept, so backwards compatibility is expected.

Describe alternatives you've considered Offer both, the CachedAlbumsService and the new one.

Additional context Given the change, a major version should be published after this.