/** * Constructor * * @throws Varien_Exception * @param array|Zend_Config $options Associative array of options or Zend_Config instance */ public function __construct($options = array()) { parent::__construct($options); if (!is_numeric($this->getOption('slab_size'))) { throw new Varien_Exception("Invalid value for the node <slab_size>. Expected to be integer."); } }
/** * Constructor * * @param array $options associative array of options * @param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested */ public function __construct($options = array()) { if (isset($options['httpConditional'])) { if ($options['httpConditional']) { Zend_Cache::throwException('httpConditional is not implemented for the moment !'); } } parent::__construct($options); }
public function __construct() { $options = array('lifetime' => null, 'write_control' => false, 'automatic_cleaning_factor' => 0, 'automatic_serialization' => true); parent::__construct($options); $be = Kwf_Cache_Simple::getBackend(); if ($be == 'memcache' || $be == 'redis') { throw new Kwf_Exception("don't use thru Zend_Cache"); } else { if ($be == 'apc') { $this->setBackend(new Kwf_Cache_Backend_Apc()); } else { if ($be == 'apcu') { $this->setBackend(new Kwf_Cache_Backend_Apcu()); } else { //fallback to file backend (NOT recommended!) $this->setBackend(new Kwf_Cache_Backend_File(array('cache_dir' => 'cache/view', 'hashed_directory_level' => 2))); } } } }
public function __construct() { $options = array('lifetime' => null, 'write_control' => false, 'automatic_cleaning_factor' => 0, 'automatic_serialization' => true); parent::__construct($options); $be = Kwf_Cache_Simple::getBackend(); if ($be == 'elastiCache') { $this->setBackend(new Kwf_Util_Aws_ElastiCache_CacheBackend(array('cacheClusterId' => Kwf_Config::getValue('aws.simpleCacheCluster'), 'compression' => true))); //do *not* use cache_namespace for this cache (we don't want to delete it on clear-cache) } else { if ($be == 'memcache') { throw new Kwf_Exception("don't use thru Zend_Cache"); } else { if ($be == 'apc') { $this->setBackend(new Kwf_Cache_Backend_Apc()); } else { //fallback to file backend (NOT recommended!) $this->setBackend(new Kwf_Cache_Backend_File(array('cache_dir' => 'cache/view', 'hashed_directory_level' => 2))); } } } }
/** * Constructor * * @param array $options Associative array of options * @return void */ public function __construct(array $options = array()) { parent::__construct($options); $this->_idStack = array(); }
/** * Constructor * * @param array $options associative array of options */ public function __construct($options = array()) { parent::__construct($options); }
public function __construct() { parent::__construct(array('automatic_serialization' => true, 'lifetime' => null, 'automatic_cleaning_factor' => 0)); $this->setBackend(new Kwf_Cache_Backend_File(array('cache_dir' => 'cache/config'))); }