\Drupflare\Anachron\Drupal\Cache MemoryCacheFactory

Builds one in-memory cache per bin and hands each the time service Drupal 11.4 requires.

A contributed module that declared its own factory with new MemoryCache() fails on that core, whose MemoryBackend constructor has a required time argument.

Summary

Methods
Properties
Constants
__construct
get
No public properties found
No public constants found
No protected methods found
No protected properties found
No protected constants found
No private methods found
bins
time
No private constants found

Properties

$bins

$bins : array

Instantiated bins, by name.

Type

array<string, MemoryCache> —

$time

$time : \Drupal\Component\Datetime\TimeInterface

Type

TimeInterface

Methods

__construct()

__construct(\Drupal\Component\Datetime\TimeInterface  $time) : mixed

Parameters

\Drupal\Component\Datetime\TimeInterface $time

Returns

mixed —

get()

get(mixed  $bin) : \Drupal\Core\Cache\CacheBackendInterface

Returns the bin of a name, creating it on first use.

Parameters

mixed $bin

Returns

\Drupal\Core\Cache\CacheBackendInterface —