mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 10:49:36 +02:00
Update
This commit is contained in:
parent
7bf71a7012
commit
9d2aa4d945
1 changed files with 2 additions and 1 deletions
|
@ -661,6 +661,7 @@ abstract class ObjectYPT implements ObjectInterface
|
||||||
$cache = Cache::getCache($name, $lifetime, $ignoreMetadata);
|
$cache = Cache::getCache($name, $lifetime, $ignoreMetadata);
|
||||||
//var_dump($name, $lifetime, $ignoreMetadata);
|
//var_dump($name, $lifetime, $ignoreMetadata);
|
||||||
if (!empty($cache)) {
|
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)");
|
self::setLastUsedCacheMode("Cache::getCache($name, $lifetime, $ignoreMetadata)");
|
||||||
return $cache;
|
return $cache;
|
||||||
}
|
}
|
||||||
|
@ -678,7 +679,7 @@ abstract class ObjectYPT implements ObjectInterface
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
if (file_exists($cachefile) && (empty($lifetime) || time() - $lifetime <= filemtime($cachefile))) {
|
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");
|
self::setLastUsedCacheMode("Local File $cachefile");
|
||||||
$c = @url_get_contents($cachefile);
|
$c = @url_get_contents($cachefile);
|
||||||
$json = _json_decode($c);
|
$json = _json_decode($c);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue