for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Vectorface\Cache;
use DateInterval;
/**
* A cache that caches nothing and always fails.
*/
class NullCache implements Cache, AtomicCounter
{
* @inheritDoc
public function get(string $key, mixed $default = null) : mixed
return $default;
}
public function set(string $key, mixed $value, DateInterval|int|null $ttl = null) : bool
return false;
public function delete(string $key) : bool
public function clean() : bool
public function flush() : bool
public function clear() : bool
public function getMultiple(iterable $keys, mixed $default = null) : iterable
$defaults = [];
foreach ($keys as $key) {
$defaults[$key] = $default;
return $defaults;
public function setMultiple(iterable $values, DateInterval|int|null $ttl = null) : bool
public function deleteMultiple(iterable $keys) : bool
public function has(string $key) : bool
public function increment(string $key, int $step = 1, DateInterval|int|null $ttl = null) : int|false
public function decrement(string $key, int $step = 1, DateInterval|int|null $ttl = null) : int|false