| @@ 759-764 (lines=6) @@ | ||
| 756 | $user_id_manager |
|
| 757 | ); |
|
| 758 | $cacheAvailable = api_get_configuration_value('apc'); |
|
| 759 | if (!empty($cacheAvailable)) { |
|
| 760 | $apcVar = api_get_configuration_value('apc_prefix') . 'userinfo_' . $user_id; |
|
| 761 | if (apcu_exists($apcVar)) { |
|
| 762 | apcu_delete($apcVar); |
|
| 763 | } |
|
| 764 | } |
|
| 765 | ||
| 766 | return true; |
|
| 767 | } |
|
| @@ 1086-1091 (lines=6) @@ | ||
| 1083 | } |
|
| 1084 | ||
| 1085 | $cacheAvailable = api_get_configuration_value('apc'); |
|
| 1086 | if (!empty($cacheAvailable)) { |
|
| 1087 | $apcVar = api_get_configuration_value('apc_prefix') . 'userinfo_' . $user_id; |
|
| 1088 | if (apcu_exists($apcVar)) { |
|
| 1089 | apcu_delete($apcVar); |
|
| 1090 | } |
|
| 1091 | } |
|
| 1092 | ||
| 1093 | return $user->getId(); |
|
| 1094 | } |
|
| @@ 1489-1496 (lines=8) @@ | ||
| 1486 | $user_id = intval($user_id); |
|
| 1487 | ||
| 1488 | // Re-use user information if not stale and already stored in APCu |
|
| 1489 | if (!empty($cacheAvailable)) { |
|
| 1490 | $apcVar = api_get_configuration_value('apc_prefix') . 'userinfo_' . $user_id; |
|
| 1491 | if (apcu_exists($apcVar)) { |
|
| 1492 | $user = apcu_fetch($apcVar); |
|
| 1493 | ||
| 1494 | return $user; |
|
| 1495 | } |
|
| 1496 | } |
|
| 1497 | ||
| 1498 | $sql = "SELECT * FROM " . Database:: get_main_table(TABLE_MAIN_USER) . " |
|
| 1499 | WHERE id = $user_id"; |
|