Elgg\Cache\SimpleCache::getRoot PHP Method

getRoot() public method

Get the base url for simple cache requests
public getRoot ( ) : string
return string The simplecache root url for the current viewtype.
    function getRoot()
    {
        $viewtype = elgg_get_viewtype();
        if ($this->isEnabled()) {
            $lastcache = (int) $this->config->get('lastcache');
        } else {
            $lastcache = 0;
        }
        return elgg_normalize_url("/cache/{$lastcache}/{$viewtype}/");
    }