. * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License version 3, * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ namespace Espo\Core\Utils\Cache; use DateInterval; use DateTimeInterface; use Psr\Cache\CacheItemInterface; class CacheItem implements CacheItemInterface { public function __construct( private string $key, private mixed $value, private bool $isHit = false, ) {} public function getKey(): string { return $this->key; } public function get(): mixed { return $this->value; } public function isHit(): bool { return $this->isHit; } public function set(mixed $value): static { $this->value = $value; return $this; } /** * Not supported. */ public function expiresAt(?DateTimeInterface $expiration): static { return $this; } /** * Not supported. */ public function expiresAfter(DateInterval|int|null $time): static { return $this; } }