private function getFilePathFromCache($filename, $queryString)
{
// return if cache not found
if ($this->cache == null) {
return null;
}
// cache key based on the filename
$cacheKey = md5($filename);
$itemIsFoundInCache = false;
$filePath = $this->cache->getItem($cacheKey, $itemIsFoundInCache);
// if there is no element in the cache, elaborate and cache it
if ($itemIsFoundInCache === false || $filePath === null) {
$filePath = $this->elaborateFilePath($filename, $queryString);
$this->cache->setItem($cacheKey, $filePath);
}
return $filePath;
}