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
|
@ -184,12 +184,14 @@ class Images
|
|||
return $data;
|
||||
}
|
||||
|
||||
$data = DI::cache()->get($url);
|
||||
$cacheKey = 'getInfoFromURL:' . sha1($url);
|
||||
|
||||
$data = DI::cache()->get($cacheKey);
|
||||
|
||||
if (empty($data) || !is_array($data)) {
|
||||
$data = self::getInfoFromURL($url);
|
||||
|
||||
DI::cache()->set($url, $data);
|
||||
DI::cache()->set($cacheKey, $data);
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
|
Loading…
Reference in New Issue
Block a user