src/Drupal/functions cache.php

Constants

CACHE_PERMANENT

CACHE_PERMANENT = \Drupal\Core\Cache\CacheBackendInterface::CACHE_PERMANENT

CACHE_TEMPORARY

CACHE_TEMPORARY = \Drupal\Core\Cache\CacheBackendInterface::CACHE_PERMANENT - 1

Functions

_cache_get_object()

_cache_get_object(mixed  $bin) : mixed

The Drupal 11 backend for a Drupal 7 bin name.

Drupal 7 named bins after their table (cache_bootstrap, cache_features) and Drupal 11 names the service without the prefix, adding it for the table. A bin with no service, such as one a contrib module declared in its schema, gets a database backend over the same table.

Parameters

mixed $bin

Returns

mixed —

cache_get()

cache_get(mixed  $cid, mixed  $bin = 'default') : mixed

Parameters

mixed $cid
mixed $bin

Returns

mixed —

cache_get_multiple()

cache_get_multiple(array  $cids, mixed  $bin = 'default') : mixed

Parameters

array $cids
mixed $bin

Returns

mixed —

cache_set()

cache_set(mixed  $cid, mixed  $data, mixed  $bin = 'default', mixed  $expire = \CACHE_PERMANENT) : mixed

Parameters

mixed $cid
mixed $data
mixed $bin
mixed $expire

Returns

mixed —

cache_clear_all()

cache_clear_all(mixed  $cid = null, mixed  $bin = null, mixed  $wildcard = false) : mixed

Parameters

mixed $cid
mixed $bin
mixed $wildcard

Returns

mixed —

_legacy_cache_tags()

_legacy_cache_tags(mixed  $bin, array  $cids) : list<string>

Tags for cache items of a bin: one for the bin, which a wildcard clear invalidates, one per item.

Parameters

mixed $bin
array $cids

Returns

list —

cache_is_empty()

cache_is_empty(mixed  $bin) : mixed

Parameters

mixed $bin

Returns

mixed —