public function init(array $config = [])
    {
        $this->setConfig($config);

        if (!empty($this->_config['groups'])) {
            sort($this->_config['groups']);
            $this->_groupPrefix = str_repeat('%s_', count($this->_config['groups']));
        }
        if (!is_numeric($this->_config['duration'])) {
            $this->_config['duration'] = strtotime($this->_config['duration']) - time();
        }

        return true;
    }
public function init(array $config = [])
    {
        $this->setConfig($config);

        if (!empty($this->_config['groups'])) {
            sort($this->_config['groups']);
            $this->_groupPrefix = str_repeat('%s_', count($this->_config['groups']));
        }
        if (!is_numeric($this->_config['duration'])) {
            $this->_config['duration'] = strtotime($this->_config['duration']) - time();
        }

        return true;
    }
public function init ( array $ config = [ ] ) { $ this -> setConfig ( $ config ) ; if ( ! empty ( $ this -> _config [ 'groups' ] ) ) { sort ( $ this -> _config [ 'groups' ] ) ; $ this -> _groupPrefix = str_repeat ( '%s_' , count ( $ this -> _config [ 'groups' ] ) ) ; } if ( ! is_numeric ( $ this -> _config [ 'duration' ] ) ) { $ this -> _config [ 'duration' ] = strtotime ( $ this -> _config [ 'duration' ] ) - time ( ) ; } return true ; }
Initialize the cache engine

Called automatically by the cache frontend. Merge the runtime config with the defaults
before use.

@param array $config Associative array of parameters for the engine
@return bool True if the engine has been successfully initialized, false if not
Initialize the cache engine