# assistant/0.3.1/backend/src/System/Container/ReflectionCacheArray.php

Assistant – Every Day Productivity Apps, version 0.3.1. 21 lines.

- Page: https://pluginprobe.com/plugins/assistant/0.3.1/code/backend/src/System/Container/ReflectionCacheArray.php
- Raw: https://pluginprobe.com/plugins/assistant/0.3.1/raw/backend/src/System/Container/ReflectionCacheArray.php
- Modified: 2020-03-25T19:33:50+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/assistant/0.3.1/code/backend/src/System/Container/ReflectionCacheArray.php#L10-L20`.

```php
<?php

namespace FL\Assistant\System\Container;

class ReflectionCacheArray implements ReflectionCache {

	private $cache = [];

	public function fetch( $key ) {
		// The additional isset() check here improves performance but we also
		// need array_key_exists() because some cached values === NULL.
		return ( isset( $this->cache[ $key ] ) || array_key_exists( $key, $this->cache ) )
			? $this->cache[ $key ]
			: false;
	}

	public function store( $key, $data ) {
		$this->cache[ $key ] = $data;
	}
}

```
