19 lines
390 B
PHP
19 lines
390 B
PHP
<?php
|
|
|
|
namespace App\Classes;
|
|
|
|
class ShowFetcher extends PageFetcher
|
|
{
|
|
public function fetch(string $url): ?array
|
|
{
|
|
$cacheKey = "show_" . md5($url);
|
|
$cached = $this->cacheGet($cacheKey);
|
|
if ($cached) return $cached;
|
|
|
|
$show = $this->fetchSingleFromApi("optimized_shows", $url);
|
|
if (!$show) return null;
|
|
|
|
$this->cacheSet($cacheKey, $show);
|
|
return $show;
|
|
}
|
|
}
|