/**
  * Perform post-registration booting of services.
  *
  * @return void
  */
 public function boot(CacheManager $cacheManager)
 {
     $cacheManager->extend('dummy', function ($app) {
         $prefix = $app['config']->get('cache.prefix');
         return $app['cache']->repository(new DummyCacheStore($prefix));
     });
 }
 protected function addFileCacheDriver(CacheManager $cacheManager)
 {
     $cacheManager->extend(static::$fileDriverName, function ($app, array $cacheConfig) use($cacheManager) {
         $store = new AlternativeHierarchialFileCacheStore(new Filesystem(static::makeFileCacheAdapter($cacheConfig)), static::getPrefix($cacheConfig));
         return $cacheManager->repository($store);
     });
 }
示例#3
0
 /**
  * Register a custom driver creator Closure.
  *
  * @param string $driver
  * @param \Closure $callback
  * @return $this 
  * @static 
  */
 public static function extend($driver, $callback)
 {
     return \Illuminate\Cache\CacheManager::extend($driver, $callback);
 }
示例#4
0
 /**
  * Register a custom driver creator Closure.
  *
  * @param string $driver
  * @param \Closure $callback
  * @return $this 
  * @static 
  */
 public static function extend($driver, $callback)
 {
     //Method inherited from \Illuminate\Support\Manager
     return \Illuminate\Cache\CacheManager::extend($driver, $callback);
 }