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


PHP Zend_Cache_Backend::setDirectives方法代碼示例

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


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

示例1: __construct

 /**
  * Constructor
  *
  * @param  array $options Associative array of options
  * @throws Zend_Cache_Exception
  * @return void
  */
 public function __construct(array $options = array())
 {
     parent::__construct($options);
     if (is_null($this->_options['slow_backend'])) {
         Zend_Cache::throwException('slow_backend option has to set');
     }
     if (is_null($this->_options['fast_backend'])) {
         Zend_Cache::throwException('fast_backend option has to set');
     }
     $this->_slowBackend = Zend_Cache::_makeBackend($this->_options['slow_backend'], $this->_options['slow_backend_options'], $this->_options['slow_backend_custom_naming'], $this->_options['slow_backend_autoload']);
     $this->_fastBackend = Zend_Cache::_makeBackend($this->_options['fast_backend'], $this->_options['fast_backend_options'], $this->_options['fast_backend_custom_naming'], $this->_options['fast_backend_autoload']);
     if (!in_array('Zend_Cache_Backend_ExtendedInterface', class_implements($this->_slowBackend))) {
         Zend_Cache::throwException('slow_backend must implement the Zend_Cache_Backend_ExtendedInterface interface');
     }
     if (!in_array('Zend_Cache_Backend_ExtendedInterface', class_implements($this->_fastBackend))) {
         Zend_Cache::throwException('slow_backend must implement the Zend_Cache_Backend_ExtendedInterface interface');
     }
     $this->_slowBackend->setDirectives($this->_directives);
     $this->_fastBackend->setDirectives($this->_directives);
 }
開發者ID:padraic,項目名稱:zfcache,代碼行數:27,代碼來源:TwoLevels.php

示例2: setDirectives

 /**
  * Set the frontend directives
  *
  * @param  array $directives Assoc of directives
  * @throws Zend_Cache_Exception
  * @return void
  */
 public function setDirectives($directives)
 {
     parent::setDirectives($directives);
     $lifetime = $this->getLifetime(false);
     if ($lifetime > 2592000) {
         // #ZF-3490 : For the memcached backend, there is a lifetime limit of 30 days (2592000 seconds)
         $this->_log('memcached backend has a limit of 30 days (2592000 seconds) for the lifetime');
     }
     if ($lifetime === null) {
         // #ZF-4614 : we tranform null to zero to get the maximal lifetime
         parent::setDirectives(array('lifetime' => 0));
     }
 }
開發者ID:rapsli,項目名稱:404crawler,代碼行數:20,代碼來源:Memcached.php

示例3: setDirectives

 /**
  * Set the frontend directives
  *
  * @param  array $directives Assoc of directives
  * @throws Zend_Cache_Exception
  * @return void
  */
 public function setDirectives($directives)
 {
     parent::setDirectives($directives);
     $lifetime = $this->getLifetime(false);
     if ($lifetime > 2592000) {
         # ZF-3490 : For the memcached backend, there is a lifetime limit of 30 days (2592000 seconds)
         $this->_log('memcached backend has a limit of 30 days (2592000 seconds) for the lifetime');
     }
 }
開發者ID:Velrok,項目名稱:wg-organizer,代碼行數:16,代碼來源:Memcached.php

示例4: setDirectives

 /**
  * Set the frontend directives
  *
  * @param  array $directives Assoc of directives
  * @throws \Zend_Cache_Exception
  * @return void
  */
 public function setDirectives($directives)
 {
     parent::setDirectives($directives);
     $lifetime = $this->getLifetime(false);
     if ($lifetime === null) {
         // #ZF-4614 : we tranform null to zero to get the maximal lifetime
         parent::setDirectives(array('lifetime' => 0));
     }
     return $this;
 }
開發者ID:sfie,項目名稱:pimcore,代碼行數:17,代碼來源:Redis.php

示例5: setDirectives

 /**
  * Set the frontend directives
  *
  * @param  array $directives Assoc of directives
  * @throws Zend_Cache_Exception
  * @return void
  */
 public function setDirectives($directives)
 {
     parent::setDirectives($directives);
     $lifetime = $this->getLifetime(false);
     if ($lifetime > self::MAX_LIFETIME) {
         Zend_Cache::throwException('Redis backend has a limit of 30 days (2592000 seconds) for the lifetime');
     }
 }
開發者ID:RabeaWahab,項目名稱:Rabee3_Cache_Backend_RedisCluster,代碼行數:15,代碼來源:RedisCluster.php

示例6: setDirectives

 /**
  * Set the frontend directives
  *
  * @param array $directives assoc of directives
  * @return void
  */
 public function setDirectives($directives)
 {
     $this->_backend->setDirectives($directives);
 }
開發者ID:kidaa30,項目名稱:magento2-platformsh,代碼行數:10,代碼來源:AbstractDecorator.php

示例7: setDirectives

 /**
  * Set the frontend directives
  *
  * @param  array $directives Assoc of directives
  * @throws Zend_Cache_Exception
  * @return void
  */
 public function setDirectives($directives)
 {
     parent::setDirectives($directives);
     $lifetime = $this->getLifetime(false);
     if ($lifetime > self::MAX_LIFETIME) {
         $this->_log('redis backend has a limit of 30 days (' . self::MAX_LIFETIME . ' seconds) for the lifetime');
     }
 }
開發者ID:cheggaaa,項目名稱:rediska-ko,代碼行數:15,代碼來源:Redis.php

示例8: setDirectives

 /**
  * Set the frontend directives
  *
  * @param  array $directives Assoc of directives
  * @throws Zend_Cache_Exception
  * @return void
  */
 public function setDirectives($directives)
 {
     parent::setDirectives($directives);
     $lifetime = $this->getLifetime(false);
     if ($lifetime > 2592000) {
         $this->_log('redis backend has a limit of 30 days (2592000 seconds) for the lifetime');
     }
 }
開發者ID:utachkin,項目名稱:Rediska,代碼行數:15,代碼來源:Redis.php


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