/**
  * Create new Instance of Cache
  * @param Config $config Configuration
  */
 public function __construct(Config $config)
 {
     $this->setEnabled($config->getCache());
     if ($this->getEnabled()) {
         $this->setDir($config->getCacheDir());
         $this->setTtl($config->getTtl());
     }
 }