interface AliasWhitelistInterface implements CacheCollectorInterface (View source)

Cache the alias whitelist.

The whitelist contains the first element of the router paths of all aliases. For example, if /node/12345 has an alias then "node" is added to the whitelist. This optimization allows skipping the lookup for every /user/{user} path if "user" is not in the whitelist.

Methods

mixed
get(string $key)

Gets value from the cache.

set(string $key, mixed $value)

Sets cache data.

delete(string $key)

Deletes the element.

has(string $key)

Returns whether data exists for this key.

reset()

Resets the local cache.

clear()

Clears the collected cache entry.

Details

mixed get(string $key)

Gets value from the cache.

Parameters

string $key

Key that identifies the data.

Return Value

mixed

The corresponding cache data.

set(string $key, mixed $value)

Sets cache data.

It depends on the specific case and implementation whether this has a permanent effect or if it just affects the current request.

Parameters

string $key

Key that identifies the data.

mixed $value

The data to be set.

delete(string $key)

Deletes the element.

It depends on the specific case and implementation whether this has a permanent effect or if it just affects the current request.

Parameters

string $key

Key that identifies the data.

has(string $key)

Returns whether data exists for this key.

Parameters

string $key

Key that identifies the data.

reset()

Resets the local cache.

Does not clear the persistent cache.

clear()

Clears the collected cache entry.