51 $cacheId =
'seo|facebook|audience|region_list|'.LANGUAGE_ID;
54 if ($cache->read(static::REGIONS_LIST_CACHE_TTL, $cacheId))
56 $data = $cache->get($cacheId);
61 'methodName' =>
'retargeting.audience.regions',
62 'parameters' => array()
65 if ($result->isSuccess())
67 foreach($result->getData() as $region)
70 'id' => $region[
'key'],
71 'name' => $region[
'name']
74 usort($data,
function ($a, $b)
76 return strcmp($a[
'name'], $b[
'name']);
78 $cache->set($cacheId, $data);