-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat / add playlist and media entitlement #70
Conversation
@@ -4,7 +4,7 @@ import { QueryClient, QueryClientProvider } from 'react-query'; | |||
const queryClient = new QueryClient({ | |||
defaultOptions: { | |||
queries: { | |||
staleTime: 3600, | |||
staleTime: 60 * 60 * 1000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch with the missing ms multiplier. Do you think an hour is a good default though or potentially long for all but the most basic config values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question, the default staleTime
is 5 minutes which is a bit short in my opinion. The data doesn't change that often.
It does provide a more pleasant browsing experience, especially with URL signing (DRM) since all requests take longer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the signed urls / drm urls only worked for a short time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The video DRM tokens are, but that doesn't count for the media/playlist metadata requests as long it's cached. We still do need to invalidate the token after 15 minutes so that we don't risk using invalidated tokens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, so the strategy is to use an hour for the default for things that can be cached indefinitely, and then control invalidation for other things manually?
Thanks @dbudzins, I've pushed one more commit which removes a redundant playlist filter (which is moved to the API service). |
Description
contentSigningService
to configgetMediaByIds
Fixes #23