/usr/share/php/Symfony/Component/Cache/Adapter
NameSizeModeActions
AbstractAdapter.php83270644editdlrm
AbstractTagAwareAdapter.php125370644editdlrm
AdapterInterface.php9630644editdlrm
ApcuAdapter.php39590644editdlrm
ArrayAdapter.php111830644editdlrm
ChainAdapter.php89680644editdlrm
CouchbaseBucketAdapter.php77290644editdlrm
CouchbaseCollectionAdapter.php67050644editdlrm
DoctrineAdapter.php28450644editdlrm
DoctrineDbalAdapter.php153550644editdlrm
FilesystemAdapter.php9330644editdlrm
FilesystemTagAwareAdapter.php75840644editdlrm
MemcachedAdapter.php137490644editdlrm
NullAdapter.php26570644editdlrm
ParameterNormalizer.php8980644editdlrm
PdoAdapter.php203310644editdlrm
PhpArrayAdapter.php125370644editdlrm
PhpFilesAdapter.php102600644editdlrm
ProxyAdapter.php84690644editdlrm
Psr16Adapter.php19410644editdlrm
RedisAdapter.php12000644editdlrm
RedisTagAwareAdapter.php122180644editdlrm
TagAwareAdapter.php113870644editdlrm
TagAwareAdapterInterface.php7750644editdlrm
TraceableAdapter.php69310644editdlrm
TraceableTagAwareAdapter.php9320644editdlrm
Edit: /usr/share/php/Symfony/Component/Cache/Adapter/NullAdapter.php (2657B)
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Cache\Adapter; use Psr\Cache\CacheItemInterface; use Symfony\Component\Cache\CacheItem; use Symfony\Contracts\Cache\CacheInterface; /** * @author Titouan Galopin */ class NullAdapter implements AdapterInterface, CacheInterface { private static $createCacheItem; public function __construct() { self::$createCacheItem ?? self::$createCacheItem = \Closure::bind( static function ($key) { $item = new CacheItem(); $item->key = $key; $item->isHit = false; return $item; }, null, CacheItem::class ); } /** * {@inheritdoc} */ public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed { $save = true; return $callback((self::$createCacheItem)($key), $save); } /** * {@inheritdoc} */ public function getItem(mixed $key): CacheItem { return (self::$createCacheItem)($key); } /** * {@inheritdoc} */ public function getItems(array $keys = []): iterable { return $this->generateItems($keys); } /** * {@inheritdoc} */ public function hasItem($key): bool { return false; } /** * {@inheritdoc} */ public function clear(string $prefix = ''): bool { return true; } /** * {@inheritdoc} */ public function deleteItem($key): bool { return true; } /** * {@inheritdoc} */ public function deleteItems(array $keys): bool { return true; } /** * {@inheritdoc} */ public function save(CacheItemInterface $item): bool { return true; } /** * {@inheritdoc} */ public function saveDeferred(CacheItemInterface $item): bool { return true; } /** * {@inheritdoc} */ public function commit(): bool { return true; } /** * {@inheritdoc} */ public function delete(string $key): bool { return $this->deleteItem($key); } private function generateItems(array $keys): \Generator { $f = self::$createCacheItem; foreach ($keys as $key) { yield $key => $f($key); } } }