Cache_Lite::__construct PHP Method

__construct() public method

$options is an assoc. Available options are : $options = array( 'cacheDir' => directory where to put the cache files (string), 'caching' => enable / disable caching (boolean), 'lifeTime' => cache lifetime in seconds (int), 'fileLocking' => enable / disable fileLocking (boolean), 'writeControl' => enable / disable write control (boolean), 'readControl' => enable / disable read control (boolean), 'readControlType' => type of read control 'crc32', 'md5', 'strlen' (string), 'pearErrorMode' => pear error mode (when raiseError is called) (cf PEAR doc) (int), 'memoryCaching' => enable / disable memory caching (boolean), 'onlyMemoryCaching' => enable / disable only memory caching (boolean), 'memoryCachingLimit' => max nbr of records to store into memory caching (int), 'fileNameProtection' => enable / disable automatic file name protection (boolean), 'automaticSerialization' => enable / disable automatic serialization (boolean), 'automaticCleaningFactor' => distable / tune automatic cleaning process (int), 'hashedDirectoryLevel' => level of the hashed directory system (int), 'hashedDirectoryUmask' => umask for hashed directory structure (int), 'errorHandlingAPIBreak' => API break for better error handling ? (boolean) );
public __construct ( array $options = [NULL] )
$options array options
    function __construct($options = array(NULL))
    {
        foreach ($options as $key => $value) {
            $this->setOption($key, $value);
        }
    }

Usage Example

 /**
  * Constructor
  *
  * $options is an assoc. To have a look at availables options,
  * see the constructor of the Cache_Lite class in 'Cache_Lite.php'
  *
  * Comparing to Cache_Lite constructor, there is another option :
  * $options = array(
  *     (...) see Cache_Lite constructor
  *     'defaultGroup' => default cache group for function caching (string)
  * );
  *
  * @param array $options options
  * @access public
  */
 function __construct($options = array(NULL))
 {
     if (isset($options['defaultGroup'])) {
         $this->_defaultGroup = $options['defaultGroup'];
     }
     parent::__construct($options);
 }
All Usage Examples Of Cache_Lite::__construct