Merge pull request #11249 from MrPetovan/bug/11248-getinfofromurl-cache-key
Hash the URL before using it as cache key in Util\Images::getInfoFromURLCached
This commit is contained in:
commit
4c39faca95
1 changed files with 4 additions and 2 deletions
|
@ -184,12 +184,14 @@ class Images
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = DI::cache()->get($url);
|
$cacheKey = 'getInfoFromURL:' . sha1($url);
|
||||||
|
|
||||||
|
$data = DI::cache()->get($cacheKey);
|
||||||
|
|
||||||
if (empty($data) || !is_array($data)) {
|
if (empty($data) || !is_array($data)) {
|
||||||
$data = self::getInfoFromURL($url);
|
$data = self::getInfoFromURL($url);
|
||||||
|
|
||||||
DI::cache()->set($url, $data);
|
DI::cache()->set($cacheKey, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
|
|
Loading…
Reference in a new issue