]> _ Git - cubist_util.git/commitdiff
wip #7894 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 15 Jan 2026 18:34:19 +0000 (19:34 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 15 Jan 2026 18:34:19 +0000 (19:34 +0100)
src/CommandLine/Docling.php

index 839dd6e5647e66ac765ba4637592486999fbfd56..91af002f87eb70a7ca07ff6a7218d6660a3e0d0a 100644 (file)
@@ -46,12 +46,12 @@ class Docling extends CommandLine
 
     public static function cache($image, $locale = null)
     {
-        return $image . '.' . md5($locale??'null') . '.html';
+        return $image . '.' . md5($locale ?? 'null') . '.html';
     }
 
     public static function isCached($image, $locale = null)
     {
         $out = self::cache($image, $locale);
-        return !(!file_exists($out) || filemtime($out) < filemtime($image) || filemtime($out) < filemtime(__FILE__));
+        return file_exists($out) && filemtime($out) > filemtime($image);
     }
 }
\ No newline at end of file