From 05c25b8b96b2250aafff1a1344694471ed343116 Mon Sep 17 00:00:00 2001 From: Alex Thomassen Date: Tue, 11 Oct 2022 19:24:26 +0200 Subject: [PATCH] [YouTube] Document caching on `videoid` --- public/static/yaml/endpoints/youtube.yaml | 1 + src/components/Cached.vue | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/public/static/yaml/endpoints/youtube.yaml b/public/static/yaml/endpoints/youtube.yaml index dce83b2..1ae8938 100644 --- a/public/static/yaml/endpoints/youtube.yaml +++ b/public/static/yaml/endpoints/youtube.yaml @@ -34,3 +34,4 @@ endpoints: notes: - 'Searches the YouTube API with the specified string and returns the first result it can find (if any).' - 'If the search string is a valid video ID, it will just return the video ID.' + - 'Searches are cached for up to 3 hours, to avoid repeated YouTube API requests. This only applies to exact & case insensitive matches on search queries.' diff --git a/src/components/Cached.vue b/src/components/Cached.vue index d52e9c1..865f4af 100644 --- a/src/components/Cached.vue +++ b/src/components/Cached.vue @@ -83,6 +83,24 @@ + +

YouTube

+ + + + + + + + + + + + + +
API Endpoint Cache length Description
videoid3 hours (10800 seconds) + Searches are cached for up to 3 hours. Only affects exact searches (case insensitive, e.g. Never Gonna Give You Up = never gonna give you up). +