bin = isset($configuration['bin']) ? $configuration['bin'] : 'file_cache'; } /** * {@inheritdoc} */ public function fetch(array $cids) { $result = []; foreach ($cids as $cid) { if (isset(static::$cache[$this->bin][$cid])) { $result[$cid] = static::$cache[$this->bin][$cid]; } } return $result; } /** * {@inheritdoc} */ public function store($cid, $data) { static::$cache[$this->bin][$cid] = $data; } /** * {@inheritdoc} */ public function delete($cid) { unset(static::$cache[$this->bin][$cid]); } /** * Allows tests to reset the static cache to avoid side effects. */ public static function reset() { static::$cache = []; } }