You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the API version changes, the cache is not cleared. This creates a potential for serialization crashes due to changes in object representations.
Suggested Improvements
Since the API version is no longer exposed to the library consumer, we should invalidate the retrofit cache when we detect an API version change internally. This will require us to persist the current version of the API to disk. We should do this either using a flat file (since this is a java library) or force the consumer to provide an implementation of an interface that writes and retrieves key value pairs to disk.
I like this. Ideally we would use Gson versions (which would map to the API version) in addition to this. Then only invalidate the cache if we know there will be a breaking change. This would also help us a bit with any other persistence (like turnstile).
Issue Summary
When the API version changes, the cache is not cleared. This creates a potential for serialization crashes due to changes in object representations.
Suggested Improvements
Since the API version is no longer exposed to the library consumer, we should invalidate the retrofit cache when we detect an API version change internally. This will require us to persist the current version of the API to disk. We should do this either using a flat file (since this is a java library) or force the consumer to provide an implementation of an interface that writes and retrieves key value pairs to disk.
Then we will force cache invalidation any time we detect a change in the API Version.
The text was updated successfully, but these errors were encountered: