]> _ Git - fluidbook_tools.git/commitdiff
wip #5184 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 29 Mar 2022 13:26:52 +0000 (15:26 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 29 Mar 2022 13:26:52 +0000 (15:26 +0200)
src/Links/VideoLink.php

index d9f9d876556f402bc84bf48ca9ea8e3a1d334091..0c6bebb5c803256c366acd96fdda9aafac7ed940 100644 (file)
@@ -83,7 +83,7 @@ class VideoLink extends Link
         } else if (!is_null($compiler) && Url::isLocal($data->to)) {
             $path = file_exists($data->to) ? $data->to : $compiler->wdir . '/' . $data->to;
 
-            $dim = Cache::get('videosize_' . Files::hashFileAttributes($path), function () use ($path) {
+            $dim = Cache::remember('videosize_' . Files::hashFileAttributes($path), 86400, function () use ($path) {
                 $e = explode(',', `ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=p=0 $path`);
                 $res = ['width' => 1920, 'height' => 1080];
                 if (count($e) > 1) {