<?php
namespace jidf\chans\Qanonbot\Cache;
use jidf\chans\Qanonbot\Interfaces\CacheInterface;
class CodeIgniterCache implements CacheInterface
{
/**
-
@var array
*/
private $cache;
/**
-
@param array $driver
*/
public function __construct($driver)
{
$this->cache = $driver;
}
/**
-
Determine if an item exists in the cache.
*
-
@param string $key
-
@return bool
*/
public function has($key)
{
return $this->cache->get($key) !== false;
}
/**
-
Retrieve an item from the cache by key.
*
-
@param string $key
-
@param mixed $default
-
@return mixed
*/
public function get($key, $default = null)
{
if ($this->has($key)) {
return $this->cache->get($key);
}
return $default;
}
Warning: fopen(buzzwords.txt) [function.fopen]: failed to open stream:
No such file or directory in C:\jidf\chans\lists\buzzwords.txt.php on line 2