当前位置: 首页>>代码示例>>PHP>>正文


PHP Cache::flush方法代码示例

本文整理汇总了PHP中Cache::flush方法的典型用法代码示例。如果您正苦于以下问题:PHP Cache::flush方法的具体用法?PHP Cache::flush怎么用?PHP Cache::flush使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Cache的用法示例。


在下文中一共展示了Cache::flush方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getLogout

 public function getLogout()
 {
     \Session::flush();
     \Cache::flush();
     \Auth::logout();
     return redirect(property_exists($this, 'redirectAfterLogout') ? $this->redirectAfterLogout : '/');
 }
开发者ID:uusa35,项目名称:abstractBackendApp,代码行数:7,代码来源:AuthController.php

示例2: boot

 protected static function boot()
 {
     parent::boot();
     static::creating(function ($entity) {
         if (!Schema::hasCollection('entities')) {
             static::createSchema();
         }
         if (empty($entity->project)) {
             throw new Exception("No project was given");
         }
         if (!empty($entity->hash) && !empty($entity->project)) {
             if (Entity::withTrashed()->where('hash', $entity->hash)->where('project', $entity->project)->first()) {
                 throw new Exception("Hash already exists for: " . $entity->title . " in project " . $entity->project);
             }
         }
         $entity->_id = static::generateIncrementedBaseURI($entity);
         if (Auth::check()) {
             $entity->user_id = Auth::user()->_id;
         } else {
             $entity->user_id = "crowdtruth";
         }
     });
     static::saved(function ($entity) {
         Temp::truncate();
         Cache::flush();
     });
     static::deleted(function ($entity) {
         Cache::flush();
     });
 }
开发者ID:crowdtruth,项目名称:crowdtruth,代码行数:30,代码来源:Entity.php

示例3: clearcache

 public function clearcache()
 {
     Cache::flush();
     var_dump(DB::select(DB::raw('SELECT CURRENT_TIMESTAMP as test from apl_file')));
     $this->layout->content = date("Y-m-d H:i:s");
     return $this->layout;
 }
开发者ID:vcorobceanu,项目名称:WebAPL,代码行数:7,代码来源:HomeController.php

示例4: team

 public function team()
 {
     \Cache::flush();
     $users = User::all();
     $bugs = Bug::all();
     return view('team')->with('users', $users)->with('bugs', $bugs);
 }
开发者ID:rogerapras,项目名称:BugSmart,代码行数:7,代码来源:HomeController.php

示例5: flush

 /**
  * Flush entire cache.
  */
 function flush()
 {
     parent::flush();
     // remove and reconnect to the SHM block
     shm_remove($this->shmid);
     $this->shmid = shm_attach($this->shmkey, $this->memsize, 0600);
 }
开发者ID:jvinet,项目名称:pronto,代码行数:10,代码来源:shm.php

示例6: boot

 public static function boot()
 {
     parent::boot();
     static::updated(function ($cache) {
         Cache::flush();
     });
 }
开发者ID:baochung2601,项目名称:vieclam,代码行数:7,代码来源:Page.php

示例7: doLogout

 public function doLogout()
 {
     //on se deconnecte, on efface tout
     Auth::logout();
     Cache::flush();
     Session::clear();
     return Redirect::to('/');
 }
开发者ID:nitishpeeroo,项目名称:HiTechOnline,代码行数:8,代码来源:UserController.php

示例8: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     $this->call('RolePermissionsTableSeeder');
     $this->call('UserTableSeeder');
     \Cache::flush();
     $this->command->line("<info>Flushed Application Cache</info>");
 }
开发者ID:viniciusferreira,项目名称:laravel-5-skeleton,代码行数:13,代码来源:DatabaseSeeder.php

示例9: flush

 function flush($time = NULL)
 {
     if (empty($time)) {
         $time = time();
     }
     parent::flush($time);
     db_query("DELETE FROM {" . $this->name . "} WHERE expire != %d AND expire < %d", CACHE_PERMANENT, $time);
 }
开发者ID:rollinsb1010,项目名称:bbcom,代码行数:8,代码来源:db.php

示例10: show

 /**
  * Display the specified person.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     /*$person = Person::findOrFail($id);
     
     		return View::make('people.show', compact('person'));
     		*/
     Cache::flush();
 }
开发者ID:sharad23,项目名称:devtest-angular,代码行数:14,代码来源:PeopleController.php

示例11: flush

 function flush()
 {
     if (!$this->active) {
         return false;
     }
     parent::flush();
     return $this->memcache->flush();
 }
开发者ID:jvinet,项目名称:pronto,代码行数:8,代码来源:memcache.php

示例12: clearCacheAction

 public function clearCacheAction()
 {
     $compiled_path = rtrim(storage_path('framework/views/'));
     array_map('unlink', glob("{$compiled_path}*"));
     \Cache::flush();
     \KSPM\LCMS\Model\SlugCache::truncate();
     return json_encode(array('status' => true));
 }
开发者ID:ksp-media,项目名称:laikacms,代码行数:8,代码来源:CmsController.php

示例13: _destroy

 public function _destroy($id)
 {
     if ($id) {
         return Cache::delete($id, $this->savePath);
     } else {
         return Cache::flush($this->savePath);
     }
 }
开发者ID:pgfeng,项目名称:ssy.9icode.club,代码行数:8,代码来源:cacheSession.class.php

示例14: setUp

 public function setUp()
 {
     parent::setUp();
     Cache::flush();
     // TODO remove quick fix
     Queue::shouldReceive('connection');
     $command = new QueueCheckerCommand();
     $this->tester = new CommandTester($command);
 }
开发者ID:brucewu16899,项目名称:laravel-queue-checker,代码行数:9,代码来源:QueueCheckerCommandTest.php

示例15: restore

 /**
  * Restore an item identified by a given id
  *
  * @param integer $id
  * @throws InvalidArgumentException
  * @throws RuntimeException
  */
 public function restore($id)
 {
     if (is_null($id) || empty($id)) {
         throw new InvalidArgumentException('Invalid ID');
     }
     $restore = $this->repository->restore($id);
     $this->cache->flush();
     return $restore;
 }
开发者ID:jinseokoh,项目名称:ask,代码行数:16,代码来源:CacheRepository.php


注:本文中的Cache::flush方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。