Файловый менеджер - Редактировать - /var/www/html/mediawiki-1.43.1/extensions/EmailNotifications/vendor/async-aws/core/src/Credentials/CacheProvider.php
Ðазад
<?php declare(strict_types=1); namespace AsyncAws\Core\Credentials; use AsyncAws\Core\Configuration; use Symfony\Contracts\Service\ResetInterface; /** * Cache the Credential generated by the decorated CredentialProvider in memory. * * The Credential will be reused until it expires. * * @author Jérémy Derussé <jeremy@derusse.com> */ final class CacheProvider implements CredentialProvider, ResetInterface { /** * @var array<string, Credentials|null> */ private $cache = []; /** * @var CredentialProvider */ private $decorated; public function __construct(CredentialProvider $decorated) { $this->decorated = $decorated; } public function getCredentials(Configuration $configuration): ?Credentials { $key = sha1(serialize($configuration)); if (!\array_key_exists($key, $this->cache) || (null !== $this->cache[$key] && $this->cache[$key]->isExpired())) { $this->cache[$key] = $this->decorated->getCredentials($configuration); } return $this->cache[$key]; } public function reset(): void { $this->cache = []; } }
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка