public function loadLocation($locationPath)
{
$location = $this->locationService->loadLocation($this->extractLocationIdFromPath($locationPath));
if (trim($location->pathString, '/') != $locationPath) {
throw new Exceptions\NotFoundException("Could not find location with path string {$locationPath}");
}
return new Values\CachedValue(new Values\RestLocation($location, $this->locationService->getLocationChildCount($location)), array('locationId' => $location->id));
}