src/Cache.php
public function set($key, $value)
        {
            if (!$this->enabled) {
                return false;
            }

            switch ($this->type) {
                case self::TYPE_APC:
                    apc_store($key, $value);
                    break;
                case self::TYPE_FILE:
                    $filename = $this->path . $key . '.cache';
                    file_put_contents($filename, serialize($value));
                    break;
            }


            return true;
        }
public function set($key, $value)
        {
            if (!$this->enabled) {
                return false;
            }

            switch ($this->type) {
                case self::TYPE_APC:
                    apc_store($key, $value);
                    break;
                case self::TYPE_FILE:
                    $filename = $this->path . $key . '.cache';
                    file_put_contents($filename, serialize($value));
                    break;
            }


            return true;
        }
public function set ( $ key , $ value ) { if ( ! $ this -> enabled ) { return false ; } switch ( $ this -> type ) { case self :: TYPE_APC : apc_store ( $ key , $ value ) ; break ; case self :: TYPE_FILE : $ filename = $ this -> path . $ key . '.cache' ; file_put_contents ( $ filename , serialize ( $ value ) ) ; break ; } return true ; }
Store an item in the cache

@param string $key The cache key to store the item under
@param mixed $value The value to store

@return bool
Store an item in the cache