public getAdapter ( string $adapterName = null ) : Bluz\Cache\CacheInterface | ||
$adapterName | string | |
return | Bluz\Cache\CacheInterface |
public function getAdapter($adapterName = null)
{
if (is_null($adapterName)) {
$adapterName = $this->getOption('adapter');
}
if (!isset($this->adapter[$adapterName])) {
$this->adapter[$adapterName] = $this->initAdapter($adapterName);
}
return $this->adapter[$adapterName];
}