REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.25 KB
Close
/opt/cpanel/ea-wappspector/vendor/rector/rector/src/Caching/ValueObject/Storage/MemoryCacheStorage.php
Text
Base64
<?php declare (strict_types=1); namespace Rector\Caching\ValueObject\Storage; use Rector\Caching\Contract\ValueObject\Storage\CacheStorageInterface; use Rector\Caching\ValueObject\CacheItem; /** * inspired by https://github.com/phpstan/phpstan-src/blob/560652088406d7461c2c4ad4897784e33f8ab312/src/Cache/MemoryCacheStorage.php */ final class MemoryCacheStorage implements CacheStorageInterface { /** * @var array<string, CacheItem> */ private $storage = []; /** * @return null|mixed */ public function load(string $key, string $variableKey) { if (!isset($this->storage[$key])) { return null; } $item = $this->storage[$key]; if (!$item->isVariableKeyValid($variableKey)) { return null; } return $item->getData(); } /** * @param mixed $data */ public function save(string $key, string $variableKey, $data) : void { $this->storage[$key] = new CacheItem($variableKey, $data); } public function clean(string $key) : void { if (!isset($this->storage[$key])) { return; } unset($this->storage[$key]); } public function clear() : void { $this->storage = []; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 2
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
FileCacheStorage.php
4.79 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
MemoryCacheStorage.php
1.25 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).