Clear the cache for the given authority.

@param  \Illuminate\Database\Eloquent\Model  $authority
@return $this
6905
public function refreshFor(Model $authority)
    {
        $this->cache->forget($this->getCacheKey($authority, 'abilities', true));
        $this->cache->forget($this->getCacheKey($authority, 'abilities', false));
        $this->cache->forget($this->getCacheKey($authority, 'roles'));

        return $this;
    }
1171381
function it_removes_authority_components_with_empty_authority()
    {
        $new_authority = $this->withAuthority("");

        $new_authority->getAuthority()->shouldReturn("");
        $new_authority->getUserInfo()->shouldReturn("");
        $new_authority->getHost()->shouldReturn("");
        $new_authority->getPort()->shouldReturn(null);
    }
1042912
final public function clear($offset)
    {
        if ($this->has($offset)) {
            unset($this->container[$offset]);
            $this->touch();
        }

        return $this;
    }
1333401
public final function clearModified()
    {
        foreach ($this as $name => $value) {
            $this->_state[$name] = $value;
        }
        return $this;
    }
460625
public function clearCacheAction() {
        $this->getConfigurationManager()->clearCache();
        $this->addFlash('sonata_flash_success', 'Cache clear successfully');

        return new \Symfony\Component\HttpFoundation\RedirectResponse($this->admin->generateUrl('list'));
    }
1326645
public function clearAccessToken(string $service):OAuthStorageInterface{

		if(array_key_exists($service, $this->tokens)){
			unset($this->tokens[$service]);
		}

		return $this;
	}
661865
public function clearCache($all = [])
    {
        if ($all) {
            $all = ['--all' => true];
        }

        $command = new ClearCacheCommand();
        $input = new ArrayInput($all);
        return $command->run($input, $this->output);
    }
749732
public function clear($rightAway = false) {

        // clear the old settings
        $this->desiredState->clear();

        // if it desired to send out the clear sequence right away
        if ($rightAway) {

            // send it out
            $this->output(EscapeSequenceGenerator::generateClearSequence());

            // reset the two states to cleared
            $this->currentState = new TerminalState();
            $this->desiredState = new TerminalState();
        }


        // chaining
        return $this;
    }
752521
public function reset($attribute)
    {
        $this->batches->add(new Batch(Batch::TYPE['REMOVE_ALL'], $attribute));

        return $this;
    }
1133355
public function clearCache()
    {
        $objects = scandir($this->getCachePath());
        $dir = $this->getCachePath();
        foreach ($objects as $object) {
            if ($object != "." && $object != "..") {
                if (is_dir($dir.$object)) {
                    self::rrmdir($dir.$object);
                } elseif ($object !== 'cache_config') {
                    unlink($dir.$object);
                }
            }
        }

        return $this;
    }
989679
public function clear()
    {
        $this->number = 0;

        $this->store->put($this->key, $this->number, $this->time);

        return $this;
    }
141662
public function clear()
	{
		$this->seed      = false;
		$this->pattern   = array();
		$this->prefixes  = array();
		$this->suffixes  = array();
		$this->modifiers = array();

		return $this;
	}
586455
public function remove(PermissionInterface $permission)
    {
        $this->cache($permission->key, null);

        if (! is_null($this->getPermission($permission))) {
            $this->permissions()
                ->detach($permission);
        }

        return true;
    }
593927
public function clear() {

		$files = glob(Path :: get('cache-shared') . '*');

		if(true === is_array($files)) {

			foreach($files as $file) {

				$file = new File($file);
				$file -> delete();
			}
		}

		return $this;
	}
1110044
public function clearCache($methods = null)
    {
        if ($methods === null || $methods === 'all') {
            $this->cache = [];
        } else {
            foreach ((array) $methods as $method) {
                $this->cache[$method] = [];
            }
        }

        return $this;
    }
277952
public function clear()
    {
        if ( ! $this->isOpened()) {
            $this->start();
        }
        session_destroy();
        $this->is_opened = false;
        return $this;
    }
560274
private function clearRequest(AuthorizationRequest $request)
    {
        /** @var Client $client */
        $client = $request->getClient();
        $clientId = $client->getClientKey();
        $this->session->remove("authn_request.$clientId");
    }