1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00

Fix cache

This commit is contained in:
DanielnetoDotCom 2021-03-12 20:17:49 -03:00
parent e97ed43696
commit 60656845b0

View file

@ -409,6 +409,8 @@ abstract class ObjectYPT implements ObjectInterface
public static function deleteCache($name)
{
global $__getAVideoCache;
unset($__getAVideoCache);
$cachefile = self::getCacheFileName($name);
@unlink($cachefile);
self::deleteSessionCache($name);
@ -416,6 +418,8 @@ abstract class ObjectYPT implements ObjectInterface
}
static function deleteCachePattern($pattern) {
global $__getAVideoCache;
unset($__getAVideoCache);
$tmpDir = self::getCacheDir();
$array = _glob($tmpDir, $pattern);
foreach ($array as $value) {
@ -435,6 +439,8 @@ abstract class ObjectYPT implements ObjectInterface
public static function deleteALLCache()
{
global $__getAVideoCache;
unset($__getAVideoCache);
$tmpDir = self::getCacheDir(true);
rrmdir($tmpDir);
self::deleteAllSessionCache();