當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。