@trigger_error('Passing NULL as the $cache_backend parameter to '.__METHOD__.'() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. See https://www.drupal.org/node/3223594',E_USER_DEPRECATED);
}
$this->cacheBackend=$cache_backend;
$this->maxAge=(int)$max_age;
}
@@ -73,7 +81,7 @@ public function __construct(ClientInterface $http_client, ConfigFactoryInterface
@trigger_error('Passing NULL as the $cache_backend parameter to '.__METHOD__.'() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. See https://www.drupal.org/node/3223594',E_USER_DEPRECATED);
}
$this->cacheBackend=$cache_backend;
$this->useCaches=isset($cache_backend);
}
/**
@@ -52,7 +59,7 @@ public function __construct(ClientInterface $http_client, ProviderRepositoryInte
publicfunctionfetchResource($url){
$cache_id="media:oembed_resource:$url";
$cached=$this->cacheGet($cache_id);
$cached=$this->cacheBackend->get($cache_id);
if($cached){
return$this->createResource($cached->data,$url);
}
@@ -82,7 +89,7 @@ public function fetchResource($url) {
thrownewResourceException('The oEmbed resource could not be decoded.',$url);
@trigger_error('Passing NULL as the $cache_backend parameter to '.__METHOD__.'() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. See https://www.drupal.org/node/3223594',E_USER_DEPRECATED);
}
$this->cacheBackend=$cache_backend;
$this->useCaches=isset($cache_backend);
}
/**
@@ -151,7 +158,7 @@ public function getResourceUrl($url, $max_width = NULL, $max_height = NULL) {
// Try to get the resource URL from the persistent cache.
$this->expectDeprecation('Passing NULL as the $cache_backend parameter to Drupal\media\OEmbed\ProviderRepository::__construct() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. See https://www.drupal.org/node/3223594');