/**
  * Gets cache info.
  *
  * @param  string $file
  * @return array|null
  */
 protected function getCache($file)
 {
     if (!$this->options['cache']) {
         return null;
     }
     if (!$this->cache) {
         $modified = 0;
         $resources = $this->controllers->getResources();
         foreach ($this->aliases as $name => $alias) {
             $resources['aliases'][] = $name . $alias[0];
         }
         foreach ($resources['controllers'] as $controller) {
             if (file_exists($controller) && ($time = filemtime($controller)) > $modified) {
                 $modified = $time;
             }
         }
         $this->cache = ['key' => sha1(json_encode($resources)), 'modified' => $modified];
     }
     $file = sprintf($file, $this->options['cache'], $this->cache['key']);
     $time = file_exists($file) ? filemtime($file) : 0;
     $fresh = $time >= $this->cache['modified'];
     return array_merge(compact('fresh', 'file'), $this->cache);
 }