Repository navigation
Show Trakt and MDBList list edits within 30 minutes - #801
Merged
Merged
Conversation
Trakt serves list items with max-age=86400 and MDBList's servers keep handing out a list's JSON for about a day, so the shared HTTP disk cache answered list rows from a copy up to a day old and user edits did not appear. List requests now carry a marker that changes every 30 minutes. A new marker is a new address, so neither the app's cache nor the services' own caches can answer it with an older copy, while loads within one window still share a single cached response. Applies to Trakt list rows, MDBList list rows and MDBList sources inside collections.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Edits to a Trakt or MDBList list took up to a day to show up in its home row. Trakt serves list items with
cache-control: max-age=86400, and MDBList's servers keep handing out a list's/jsonfor about a day, so the shared OkHttp disk cache answered the row from a stale copy (0 ms responses in the log, no request to the service at all).What changed
_=<window>) that changes every 30 minutes. A new marker is a new address, so neither the app's HTTP cache nor the services' own caches can answer it with an older copy; loads within one window still share a single cached response.users/{user}/lists/{id}/itemsandlists/{id}/items), MDBList list rows, and MDBList sources inside collections.Testing
ListFreshnessTest: window boundaries, URL building, and that Trakt and MDBList rows really send the marker; existing catalog and collection loading tests pass.