Reuse cache result
This commit is contained in:
parent
4f9b76d821
commit
1f4aa5350a
|
@ -119,8 +119,8 @@ class URLGenerator implements IURLGenerator {
|
||||||
public function imagePath($app, $image) {
|
public function imagePath($app, $image) {
|
||||||
$cache = $this->cacheFactory->create('imagePath');
|
$cache = $this->cacheFactory->create('imagePath');
|
||||||
$cacheKey = $app.'-'.$image;
|
$cacheKey = $app.'-'.$image;
|
||||||
if($cache->hasKey($cacheKey)) {
|
if($key = $cache->get($cacheKey)) {
|
||||||
return $cache->get($cacheKey);
|
return $key;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read the selected theme from the config file
|
// Read the selected theme from the config file
|
||||||
|
|
Loading…
Reference in New Issue