当前位置: 首页>>代码示例>>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;未经允许,请勿转载。