src/xPDO/Cache/xPDOCacheManager.php
public function getCacheProvider($key = '', $options = array()) {
        $objCache = null;
        if (empty($key)) {
            $key = $this->getOption(xPDO::OPT_CACHE_KEY, $options, 'default');
        }
        $objCacheClass= 'xPDO\\Cache\\xPDOFileCache';
        if (!isset($this->caches[$key]) || !is_object($this->caches[$key])) {
            if ($cacheClass = $this->getOption($key . '_' . xPDO::OPT_CACHE_HANDLER, $options, $this->getOption(xPDO::OPT_CACHE_HANDLER, $options))) {
                $cacheClass = $this->xpdo->loadClass($cacheClass, XPDO_CORE_PATH, false, true);
                if ($cacheClass) {
                    $objCacheClass= $cacheClass;
                }
            }
            $options[xPDO::OPT_CACHE_KEY]= $key;
            $this->caches[$key] = new $objCacheClass($this->xpdo, $options);
            if (empty($this->caches[$key]) || !$this->caches[$key]->isInitialized()) {
                $this->caches[$key] = new xPDOFileCache($this->xpdo, $options);
            }
            $objCache = $this->caches[$key];
            $objCacheClass= get_class($objCache);
        } else {
            $objCache =& $this->caches[$key];
            $objCacheClass= get_class($objCache);
        }
        if ($this->xpdo->getDebug() === true) $this->xpdo->log(xPDO::LOG_LEVEL_DEBUG, "Returning {$objCacheClass}:{$key} cache provider from available providers: " . print_r(array_keys($this->caches), 1));
        return $objCache;
    }
public function getCacheProvider($key = '', $options = array()) {
        $objCache = null;
        if (empty($key)) {
            $key = $this->getOption(xPDO::OPT_CACHE_KEY, $options, 'default');
        }
        $objCacheClass= 'xPDO\\Cache\\xPDOFileCache';
        if (!isset($this->caches[$key]) || !is_object($this->caches[$key])) {
            if ($cacheClass = $this->getOption($key . '_' . xPDO::OPT_CACHE_HANDLER, $options, $this->getOption(xPDO::OPT_CACHE_HANDLER, $options))) {
                $cacheClass = $this->xpdo->loadClass($cacheClass, XPDO_CORE_PATH, false, true);
                if ($cacheClass) {
                    $objCacheClass= $cacheClass;
                }
            }
            $options[xPDO::OPT_CACHE_KEY]= $key;
            $this->caches[$key] = new $objCacheClass($this->xpdo, $options);
            if (empty($this->caches[$key]) || !$this->caches[$key]->isInitialized()) {
                $this->caches[$key] = new xPDOFileCache($this->xpdo, $options);
            }
            $objCache = $this->caches[$key];
            $objCacheClass= get_class($objCache);
        } else {
            $objCache =& $this->caches[$key];
            $objCacheClass= get_class($objCache);
        }
        if ($this->xpdo->getDebug() === true) $this->xpdo->log(xPDO::LOG_LEVEL_DEBUG, "Returning {$objCacheClass}:{$key} cache provider from available providers: " . print_r(array_keys($this->caches), 1));
        return $objCache;
    }
public function getCacheProvider ( $ key = '' , $ options = array ( ) ) { $ objCache = null ; if ( empty ( $ key ) ) { $ key = $ this -> getOption ( xPDO :: OPT_CACHE_KEY , $ options , 'default' ) ; } $ objCacheClass = 'xPDO\\Cache\\xPDOFileCache' ; if ( ! isset ( $ this -> caches [ $ key ] ) || ! is_object ( $ this -> caches [ $ key ] ) ) { if ( $ cacheClass = $ this -> getOption ( $ key . '_' . xPDO :: OPT_CACHE_HANDLER , $ options , $ this -> getOption ( xPDO :: OPT_CACHE_HANDLER , $ options ) ) ) { $ cacheClass = $ this -> xpdo -> loadClass ( $ cacheClass , XPDO_CORE_PATH , false , true ) ; if ( $ cacheClass ) { $ objCacheClass = $ cacheClass ; } } $ options [ xPDO :: OPT_CACHE_KEY ] = $ key ; $ this -> caches [ $ key ] = new $ objCacheClass ( $ this -> xpdo , $ options ) ; if ( empty ( $ this -> caches [ $ key ] ) || ! $ this -> caches [ $ key ] -> isInitialized ( ) ) { $ this -> caches [ $ key ] = new xPDOFileCache ( $ this -> xpdo , $ options ) ; } $ objCache = $ this -> caches [ $ key ] ; $ objCacheClass = get_class ( $ objCache ) ; } else { $ objCache = & $ this -> caches [ $ key ] ; $ objCacheClass = get_class ( $ objCache ) ; } if ( $ this -> xpdo -> getDebug ( ) === true ) $ this -> xpdo -> log ( xPDO :: LOG_LEVEL_DEBUG , "Returning {$objCacheClass}:{$key} cache provider from available providers: " . print_r ( array_keys ( $ this -> caches ) , 1 ) ) ; return $ objCache ; }
Get an instance of a provider which implements the xPDOCache interface.

@param string $key
@param array $options

@return xPDOCache|null
Get an instance of a provider which implements the xPDOCache interface .