Example #1
0
 public function setCache(Cache $cache)
 {
     $this->classMap = $cache->read(self::CACHE_KEY) ?: [];
     $this->cache = $cache;
     if ($this->composerAutoloader) {
         $this->composerAutoloader->addClassMap($this->classMap);
     }
 }
Example #2
0
 protected function createRailsAppCache()
 {
     $cache = new Cache();
     $config = $this->app->config()['rails_cache_store'];
     if (!$config) {
         $store = 'FileStore';
         $config = [$this->app->config()['paths']['root']->expand('tmp', 'cache', 'rails')];
     } else {
         $store = array_shift($config);
     }
     $store = $this->createCacheStore($store, $config);
     $cache->setStore($store);
     return $cache;
 }