/** * Set the caching context, the page url. * @param string $locale * @param string $url */ public static function setContext($locale, $url = null) { if (!strlen($url)) { $url = '/'; } self::$url = $url; self::$locale = $locale; if ($cached = Cache::get(self::makeCacheKey())) { self::$cache = (array) $cached; } }