Silber\Bouncer\CachedClipboard::refresh PHP Method

refresh() public method

Clear the cache.
public refresh ( null | Model $authority = null )
$authority null | Illuminate\Database\Eloquent\Model
    public function refresh($authority = null)
    {
        if (!is_null($authority)) {
            return $this->refreshFor($authority);
        }
        if ($this->cache instanceof TaggedCache) {
            $this->cache->flush();
        } else {
            $this->refreshAllIteratively();
        }
        return $this;
    }

Usage Example

Example #1
0
 /**
  * Clear the cache.
  *
  * @param  null|\Illuminate\Database\Eloquent\Model  $user
  * @return $this
  */
 public function refresh(Model $user = null)
 {
     $this->clipboard->refresh($user);
     return $this;
 }