Performance enhancement

Don't use deep handing lastMod check if we don't have to
This commit is contained in:
Samuel Georges 2016-07-30 16:14:54 +10:00
parent 3a6bf35f06
commit b1a86b5f9f

View File

@ -309,8 +309,14 @@ class CombineAssets
$this->setHashOnCombinerFilters($cacheKey); $this->setHashOnCombinerFilters($cacheKey);
$combiner = $this->prepareCombiner($assets); $combiner = $this->prepareCombiner($assets);
$factory = new AssetFactory($this->localPath);
$lastMod = $factory->getLastModified($combiner); if ($this->useDeepHashing) {
$factory = new AssetFactory($this->localPath);
$lastMod = $factory->getLastModified($combiner);
}
else {
$lastMod = $combiner->getLastModified();
}
$cacheInfo = [ $cacheInfo = [
'version' => $cacheKey.'-'.$lastMod, 'version' => $cacheKey.'-'.$lastMod,