1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
This commit is contained in:
Daniel Neto 2024-04-17 13:29:44 -03:00
parent 7bf71a7012
commit 9d2aa4d945

View file

@ -661,6 +661,7 @@ abstract class ObjectYPT implements ObjectInterface
$cache = Cache::getCache($name, $lifetime, $ignoreMetadata);
//var_dump($name, $lifetime, $ignoreMetadata);
if (!empty($cache)) {
if(preg_match('/live/', $name)){_error_log("getCache 1: stats [$name] lifetime=$lifetime filemtime=".filemtime($cachefile)." ".$cachefile);}
self::setLastUsedCacheMode("Cache::getCache($name, $lifetime, $ignoreMetadata)");
return $cache;
}
@ -678,7 +679,7 @@ abstract class ObjectYPT implements ObjectInterface
/**
*/
if (file_exists($cachefile) && (empty($lifetime) || time() - $lifetime <= filemtime($cachefile))) {
if(preg_match('/live/', $name)){_error_log("getCache: stats [$name] lifetime=$lifetime filemtime=".filemtime($cachefile)." ".$cachefile);}
if(preg_match('/live/', $name)){_error_log("getCache 2: stats [$name] lifetime=$lifetime filemtime=".filemtime($cachefile)." ".$cachefile);}
self::setLastUsedCacheMode("Local File $cachefile");
$c = @url_get_contents($cachefile);
$json = _json_decode($c);