mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Fix cache
This commit is contained in:
parent
b798b8a024
commit
1d7821e224
1 changed files with 2 additions and 2 deletions
|
@ -463,7 +463,7 @@ abstract class ObjectYPT implements ObjectInterface
|
||||||
public static function getCacheFileName($name)
|
public static function getCacheFileName($name)
|
||||||
{
|
{
|
||||||
$name = self::cleanCacheName($name);
|
$name = self::cleanCacheName($name);
|
||||||
$ignoreLocationDirectoryName = strpos($name, DIRECTORY_SEPARATOR);
|
$ignoreLocationDirectoryName = (strpos($name, DIRECTORY_SEPARATOR)!==false);
|
||||||
$tmpDir = self::getCacheDir($ignoreLocationDirectoryName);
|
$tmpDir = self::getCacheDir($ignoreLocationDirectoryName);
|
||||||
$uniqueHash = md5(__FILE__);
|
$uniqueHash = md5(__FILE__);
|
||||||
return $tmpDir . DIRECTORY_SEPARATOR . $name . $uniqueHash;
|
return $tmpDir . DIRECTORY_SEPARATOR . $name . $uniqueHash;
|
||||||
|
@ -472,7 +472,7 @@ abstract class ObjectYPT implements ObjectInterface
|
||||||
public static function deleteCacheFromPattern($name)
|
public static function deleteCacheFromPattern($name)
|
||||||
{
|
{
|
||||||
$name = self::cleanCacheName($name);
|
$name = self::cleanCacheName($name);
|
||||||
$ignoreLocationDirectoryName = strpos($name, DIRECTORY_SEPARATOR);
|
$ignoreLocationDirectoryName = (strpos($name, DIRECTORY_SEPARATOR)!==false);
|
||||||
$tmpDir = self::getCacheDir($ignoreLocationDirectoryName);
|
$tmpDir = self::getCacheDir($ignoreLocationDirectoryName);
|
||||||
$filePattern = $tmpDir . DIRECTORY_SEPARATOR . $name;
|
$filePattern = $tmpDir . DIRECTORY_SEPARATOR . $name;
|
||||||
foreach (glob("{$filePattern}*") as $filename) {
|
foreach (glob("{$filePattern}*") as $filename) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue