%PDF- %PDF-
Direktori : /data/www_bck/varak.net_bck/ampache.varak.net/modules/React/Cache/ |
Current File : //data/www_bck/varak.net_bck/ampache.varak.net/modules/React/Cache/ArrayCache.php |
<?php namespace React\Cache; use React\Promise\When; class ArrayCache implements CacheInterface { private $data = array(); public function get($key) { if (!isset($this->data[$key])) { return When::reject(); } return When::resolve($this->data[$key]); } public function set($key, $value) { $this->data[$key] = $value; } public function remove($key) { unset($this->data[$key]); } }