The Symfony Cache component

Code
<?php

use Symfony\Component\Cache\Adapter\ArrayAdapter;

$cache = new ArrayAdapter();
$itemKey = 'cacheMeIfYouCan';
$value = 'Foo';

if (false === $cache->hasItem($itemKey)) {
    echo 'Write value in cache' . PHP_EOL;
    $item = $cache->getItem($itemKey);
    $item->set($value);
    $cache->save($item);
}

$item = $cache->getItem($itemKey);
dump($item->get());
Result
Write value in cache
^ "Foo"
Used Versions
PHP 8.3, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8