phpDocumentor

MenuCache

Class MenuCache

Table of Contents

CACHE_NAME  = 'admin_menu'
$cache  : CacheInterface
$cacheName  : string
__construct()  : mixed
MenuCache constructor.
buildMenuCache()  : void
Caches menu data.
deleteCache()  : void
Deletes the menu cache for the given language.
getCache()  : array<string|int, mixed>
Provides menu data from cache.
hasCache()  : bool
Checks if admin menu cache is available.
getCacheName()  : string
Provides the cache name.

Constants

CACHE_NAME

private mixed CACHE_NAME = 'admin_menu'

Properties

Methods

buildMenuCache()

Caches menu data.

public buildMenuCache(MenuGroups $groups) : void

This function serializes the menu groups aggregate and writes the data to the admin_menu cache.

Parameters
$groups : MenuGroups
Return values
void

deleteCache()

Deletes the menu cache for the given language.

public deleteCache(int $languageId) : void
Parameters
$languageId : int
Return values
void

getCache()

Provides menu data from cache.

public getCache() : array<string|int, mixed>

Returns an empty array and logs related errors if something fails.

Return values
array<string|int, mixed>

hasCache()

Checks if admin menu cache is available.

public hasCache() : bool
Return values
bool

getCacheName()

Provides the cache name.

private getCacheName(int $languageId) : string
Parameters
$languageId : int
Return values
string

Search results