4 * Class CRM_Utils_Cache_Arraycache
6 class CRM_Utils_Cache_Arraycache
implements CRM_Utils_Cache_Interface
{
9 * The cache storage container, an in memory array by default
16 * @param array $config
17 * An array of configuration params.
19 * @return \CRM_Utils_Cache_Arraycache
21 public function __construct($config) {
22 $this->_cache
= array();
29 public function set($key, &$value) {
30 $this->_cache
[$key] = $value;
38 public function get($key) {
39 return CRM_Utils_Array
::value($key, $this->_cache
);
45 public function delete($key) {
46 unset($this->_cache
[$key]);
49 public function flush() {
51 $this->_cache
= array();