Initial commit cache

This commit is contained in:
2018-02-28 15:01:45 +01:00
commit 01a13b7f2b
20 changed files with 1117 additions and 0 deletions

View 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;
}
}