52 lines
799 B
PHP
52 lines
799 B
PHP
<?php
|
|
|
|
namespace IQParts\Cache\Adapter;
|
|
|
|
final class NullAdapter implements CacheAdapterInterface
|
|
{
|
|
|
|
/**
|
|
* @param string $key
|
|
* @return mixed
|
|
*/
|
|
public function get(string $key)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* @param string $key
|
|
* @param $value
|
|
* @param int|null $ttl
|
|
* @return void
|
|
*/
|
|
public function set(string $key, $value, int $ttl = null): void
|
|
{
|
|
}
|
|
|
|
/**
|
|
* @param string $key
|
|
* @return void
|
|
*/
|
|
public function delete(string $key): void
|
|
{
|
|
}
|
|
|
|
/**
|
|
* @param string $key
|
|
* @return mixed
|
|
*/
|
|
public function keys($key = '')
|
|
{
|
|
return [];
|
|
}
|
|
|
|
/**
|
|
* @param $key
|
|
* @return int
|
|
*/
|
|
public function ttl($key): int
|
|
{
|
|
return 0;
|
|
}
|
|
} |