當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_Cache_Core::getBackend方法代碼示例

本文整理匯總了PHP中Zend_Cache_Core::getBackend方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Cache_Core::getBackend方法的具體用法?PHP Zend_Cache_Core::getBackend怎麽用?PHP Zend_Cache_Core::getBackend使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend_Cache_Core的用法示例。


在下文中一共展示了Zend_Cache_Core::getBackend方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _getTagSupportForCache

 /**
  * Internal method to check if the given cache supports tags
  *
  * @param Zend_Cache $cache
  */
 private static function _getTagSupportForCache()
 {
     $backend = self::$_cache->getBackend();
     if ($backend instanceof Zend_Cache_Backend_ExtendedInterface) {
         $cacheOptions = $backend->getCapabilities();
         self::$_cacheTags = $cacheOptions['tags'];
     } else {
         self::$_cacheTags = false;
     }
     return self::$_cacheTags;
 }
開發者ID:ankitsapient,項目名稱:testgithubankit,代碼行數:16,代碼來源:Adapter.php

示例2: _getBackendType

 /**
  * Get cache backend type
  *
  * @return string
  */
 protected function _getBackendType()
 {
     $backendType = '';
     if ($this->_frontend) {
         $backend = $this->_frontend->getBackend();
         $backendClass = get_class($backend);
         $possibleCacheBackends = array('Zend_Cache_Backend_', 'Varien_Cache_Backend_');
         foreach ($possibleCacheBackends as $backendClassStart) {
             if (substr($backendClass, 0, strlen($backendClassStart)) == $backendClassStart) {
                 $backendType = substr($backendClass, strlen($backendClassStart));
                 break;
             }
         }
     }
     return $backendType;
 }
開發者ID:natxetee,項目名稱:magento2,代碼行數:21,代碼來源:Cache.php

示例3: getConfigCacheInfo

 /**
  * Returns cache information
  *
  * @return array
  */
 public function getConfigCacheInfo()
 {
     $cacheConfig = $this->container->getParameter('shopware.cache');
     if ($this->cache->getBackend() instanceof \Zend_Cache_Backend_Apc) {
         $apcInfo = apc_cache_info('user');
         $info['files'] = $apcInfo['num_entries'];
         $info['size'] = $this->encodeSize($apcInfo['mem_size']);
     } else {
         if (!empty($cacheConfig['backendOptions']['cache_dir'])) {
             $dir = $cacheConfig['backendOptions']['cache_dir'];
         } elseif (!empty($cacheConfig['backendOptions']['slow_backend_options']['cache_dir'])) {
             $dir = $cacheConfig['backendOptions']['slow_backend_options']['cache_dir'];
         }
         $info = $this->getDirectoryInfo($dir);
     }
     $info['name'] = 'Shopware configuration';
     $backend = get_class($this->cache->getBackend());
     $backend = str_replace('Zend_Cache_Backend_', '', $backend);
     $info['backend'] = $backend;
     return $info;
 }
開發者ID:Goucher,項目名稱:shopware,代碼行數:26,代碼來源:CacheManager.php

示例4: getBackend

 /**
  * {@inheritdoc}
  */
 public function getBackend()
 {
     return $this->_frontend->getBackend();
 }
開發者ID:IlyaGluschenko,項目名稱:test001,代碼行數:7,代碼來源:Zend.php

示例5: getBackendAdapter

 /**
  * Returns the backend adapter
  *
  * @return \Zend_Cache_Backend
  */
 public function getBackendAdapter()
 {
     return $this->cacheAdapter->getBackend();
 }
開發者ID:cipherpols,項目名稱:cze,代碼行數:9,代碼來源:CacheManager.php


注:本文中的Zend_Cache_Core::getBackend方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。