How to bypass the caching of composite in Bitrix?

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');


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

 if (empty($City )) {
 if (\Bitrix\Main\Loader::includeModule('olegpro.ipgeobase')) {
 $arIpGeo = \Olegpro\IpGeoBase\IpGeoBase::getInstance()->getRecord();
 $City = $arIpGeo['city'];
 if (!empty($City)) {
March 19th 20 at 08:54
1 answer
March 19th 20 at 08:56
Solution there is little article interesting, you can look

Find more questions by tags 1C-Bitrix