Cache videos for a maximum of 30 seconds on the client side.

This commit is contained in:
FireMaskterK 2021-10-23 23:13:54 +01:00
parent ba54acdca9
commit b63786a15e
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD

View file

@ -87,7 +87,7 @@ public class ServerLauncher extends MultithreadedHttpServerLauncher {
})).map(GET, "/streams/:videoId", AsyncServlet.ofBlocking(executor, request -> {
try {
return getJsonResponse(ResponseHelper.streamsResponse(request.getPathParameter("videoId")),
"public, s-maxage=21540");
"public, s-maxage=21540, max-age=30");
} catch (Exception e) {
return getErrorResponse(e, request.getPath());
}