/**
* Constructor
*
* @param array $options Cache options
*
* @since 1.7.0
*/
public function __construct($options)
{
$app = Factory::getApplication();
$this->_options = array('cachebase' => $app->get('cache_path', JPATH_CACHE), 'lifetime' => (int) $app->get('cachetime'), 'language' => $app->get('language', 'en-GB'), 'storage' => $app->get('cache_handler', ''), 'defaultgroup' => 'default', 'locking' => true, 'locktime' => 15, 'checkTime' => true, 'caching' => $app->get('caching') >= 1);
// Overwrite default options with given options
foreach ($options as $option => $value) {
if (isset($options[$option]) && $options[$option] !== '') {
$this->_options[$option] = $options[$option];
}
}
if (empty($this->_options['storage'])) {
$this->setCaching(false);
}
}