public function registerCache(FrontendInterface $cache, bool $persistent = false): void
    {
        $identifier = $cache->getIdentifier();
        if (isset($this->caches[$identifier])) {
            throw new DuplicateIdentifierException('A cache with identifier "' . $identifier . '" has already been registered.', 1203698223);
        }
        $this->caches[$identifier] = $cache;
        if ($persistent === true) {
            $this->persistentCaches[$identifier] = $cache;
        }
    }
public function registerCache(FrontendInterface $cache, bool $persistent = false): void
    {
        $identifier = $cache->getIdentifier();
        if (isset($this->caches[$identifier])) {
            throw new DuplicateIdentifierException('A cache with identifier "' . $identifier . '" has already been registered.', 1203698223);
        }
        $this->caches[$identifier] = $cache;
        if ($persistent === true) {
            $this->persistentCaches[$identifier] = $cache;
        }
    }
public function registerCache ( FrontendInterface $ cache , bool $ persistent = false ) : void { $ identifier = $ cache -> getIdentifier ( ) ; if ( isset ( $ this -> caches [ $ identifier ] ) ) { throw new DuplicateIdentifierException ( 'A cache with identifier "' . $ identifier . '" has already been registered.' , 1203698223 ) ; } $ this -> caches [ $ identifier ] = $ cache ; if ( $ persistent === true ) { $ this -> persistentCaches [ $ identifier ] = $ cache ; } }
Registers a cache so it can be retrieved at a later point.

@param FrontendInterface $cache The cache frontend to be registered
@param bool $persistent
@return void
@throws DuplicateIdentifierException if a cache with the given identifier has already been registered.
@api
Registers a cache so it can be retrieved at a later point .