mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
fetch imdb del cover cache
This commit is contained in:
@@ -1124,6 +1124,7 @@ HTML;
|
|||||||
NexusDB::cache_del('imdb_id_'.$thenumbers.'_large', true);
|
NexusDB::cache_del('imdb_id_'.$thenumbers.'_large', true);
|
||||||
NexusDB::cache_del('imdb_id_'.$thenumbers.'_median', true);
|
NexusDB::cache_del('imdb_id_'.$thenumbers.'_median', true);
|
||||||
NexusDB::cache_del('imdb_id_'.$thenumbers.'_minor', true);
|
NexusDB::cache_del('imdb_id_'.$thenumbers.'_minor', true);
|
||||||
|
NexusDB::cache_del(Imdb::getMovieCoverCacheKey($imdb_id));
|
||||||
do_log("$log, done");
|
do_log("$log, done");
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$log .= ", error: " . $e->getMessage() . ", trace: " . $e->getTraceAsString();
|
$log .= ", error: " . $e->getMessage() . ", trace: " . $e->getTraceAsString();
|
||||||
|
|||||||
+5
-1
@@ -312,7 +312,7 @@ class Imdb
|
|||||||
if (!$enabled) {
|
if (!$enabled) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
return NexusDB::remember("imdb:cover:$imdbId", 3600, function() use ($imdbId) {
|
return NexusDB::remember(self::getMovieCoverCacheKey($imdbId), 864000, function() use ($imdbId) {
|
||||||
if ($this->getCacheStatus($imdbId) != 1) {
|
if ($this->getCacheStatus($imdbId) != 1) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -323,6 +323,10 @@ class Imdb
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getMovieCoverCacheKey($imdbId): string
|
||||||
|
{
|
||||||
|
return "imdb:cover:$imdbId";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user