- Модуль: main
- Путь к файлу: ~/bitrix/modules/main/lib/data/cacheengineapc.php
- Класс: BitrixMainDataCacheEngineApc
- Вызов: CacheEngineApc::addToSet
public function addToSet($key, $value)
{
$cacheKey = sha1($key . '|' . $value);
if (array_key_exists($cacheKey, self::$listKeys))
{
return;
}
$iexKey = $key . '|iex|' . $cacheKey;
$itemExist = apcu_fetch($iexKey);
if ($itemExist == $cacheKey)
{
return;
}
$list = apcu_fetch($key);
if (!is_array($list))
{
$list = [];
}
if (!array_key_exists($value, $list))
{
$list[$value] = 1;
apcu_store($key, $list, 0);
self::$listKeys[$cacheKey] = 1;
}
$this->set($iexKey, 2591000, $cacheKey);
}