function LruMemoryCache::__construct

Constructs an LruMemoryCache object.

Parameters

\Drupal\Component\Datetime\TimeInterface $time: The time service.

int $allowedSlots: The number of slots to allocate for items in the cache.

Overrides MemoryBackend::__construct

File

core/lib/Drupal/Core/Cache/MemoryCache/LruMemoryCache.php, line 27

Class

LruMemoryCache
Defines a least recently used (LRU) static cache implementation.

Namespace

Drupal\Core\Cache\MemoryCache

Code

public function __construct(TimeInterface $time, int $allowedSlots) {
    parent::__construct($time);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.