Skip to content

Commit

Permalink
Add flushCache method
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga committed Dec 6, 2017
1 parent afbc5ac commit 47fbf49
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Illuminate/Filesystem/FilesystemAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,20 @@ public function getDriver()
return $this->driver;
}

/**
* Flush the Flysystem cache.
*
* @return void
*/
public function flushCache()
{
$adapter = $this->driver->getAdapter();

if ($adapter instanceof CachedAdapter) {
$adapter->getCache()->flush();
}
}

/**
* Filter directory contents by type.
*
Expand Down

0 comments on commit 47fbf49

Please sign in to comment.