Overrides CacheContextInterface::getContext
public function getContext() { $request = $this->requestStack ->getCurrentRequest(); $path_elements = explode('/', trim($request->getPathInfo(), '/')); array_pop($path_elements); return implode('/', $path_elements); }