Initial commit cache
This commit is contained in:
52
src/Adapter/NullAdapter.php
Normal file
52
src/Adapter/NullAdapter.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?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)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
* @return void
|
||||
*/
|
||||
public function delete(string $key)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
* @return mixed
|
||||
*/
|
||||
public function keys($key = '')
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $key
|
||||
* @return int
|
||||
*/
|
||||
public function ttl($key): int
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user