mirror of
https://github.com/YunoHost-Apps/kanboard_ynh.git
synced 2024-09-03 19:36:17 +02:00
32 lines
497 B
PHP
32 lines
497 B
PHP
<?php
|
|
|
|
namespace Core;
|
|
|
|
class MemoryCache extends Cache
|
|
{
|
|
private $storage = array();
|
|
|
|
public function init()
|
|
{
|
|
}
|
|
|
|
public function set($key, $value)
|
|
{
|
|
$this->storage[$key] = $value;
|
|
}
|
|
|
|
public function get($key)
|
|
{
|
|
return isset($this->storage[$key]) ? $this->storage[$key] : null;
|
|
}
|
|
|
|
public function flush()
|
|
{
|
|
$this->storage = array();
|
|
}
|
|
|
|
public function remove($key)
|
|
{
|
|
unset($this->storage[$key]);
|
|
}
|
|
}
|