How to bypass the caching of composite in Bitrix?

Welcome.
In the item card I define the city's ip.
To defeat caching I have implemented this code in component_epilog.php.

But still strange city cached. After the second page reload the city there is a need.
I suppose it caches it in composite mode?
How to work around it to absolute code was executed in the cache bypass?

AddEventHandler('main', 'OnEndBufferContent', 'SetDeleveryInfo');
...

 $City = $_SESSION['RSLOCATION']['LOCATION']['CITY_NAME'];

 If (empty($City)) {
 $City = CRS_Location::GetCityName()['CITY_NAME'];
 if (!empty($City)) {
 $_SESSION['RSLOCATION']['LOCATION']['CITY_NAME'] = $City;
}
}

 if (empty($City )) {
 if (\Bitrix\Main\Loader::includeModule('olegpro.ipgeobase')) {
 $arIpGeo = \Olegpro\IpGeoBase\IpGeoBase::getInstance()->getRecord();
 $City = $arIpGeo['city'];
 if (!empty($City)) {
 $_SESSION['RSLOCATION']['LOCATION']['CITY_NAME'] = $City;
}
}
 }
March 19th 20 at 08:54
1 answer
March 19th 20 at 08:56
Solution
g-rain-design.ru/blog/posts/bitrix-composite-cache there is little article interesting, you can look

Find more questions by tags 1C-Bitrix