CacheableNavigationService::getObjectCache
Core method to directly fetch the contents of the stored object-cache. You can utilise this in custom / project-specific logic to iterate over and return {@link CacheableSiteTree} and {@link CacheableSiteConfig} objects instead of going to the database.
Example usage: <code> $mode = 'Live'; $conf = SiteConfig::current_site_config(); $cacheService = new CacheableNavigationService($mode, $conf); $objectCache = $cacheService->getObjectCache(); $cachedSiteTree = ArrayList::create($cache->get_site_map()); $cachedSiteConfig = ArrayList::create($cache->get_site_config()); <code>
Signature
public function getObjectCache([
$frontend = NULL,
[string
$identifier = NULL]] )
Parameters
$frontend
—$identifier
— string
Returns
- boolean|CachedNavigation