Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/storage/PhabricatorUserCache.php
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | public static function writeCaches(array $values) { | ||||
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); | $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); | ||||
foreach (PhabricatorLiskDAO::chunkSQL($sql) as $chunk) { | foreach (PhabricatorLiskDAO::chunkSQL($sql) as $chunk) { | ||||
queryfx( | queryfx( | ||||
$conn_w, | $conn_w, | ||||
'INSERT INTO %T (userPHID, cacheIndex, cacheKey, cacheData, cacheType) | 'INSERT INTO %T (userPHID, cacheIndex, cacheKey, cacheData, cacheType) | ||||
VALUES %Q | VALUES %Q | ||||
ON DUPLICATE KEY UPDATE cacheData = VALUES(cacheData)', | ON DUPLICATE KEY UPDATE | ||||
cacheData = VALUES(cacheData), | |||||
cacheType = VALUES(cacheType)', | |||||
$table->getTableName(), | $table->getTableName(), | ||||
$chunk); | $chunk); | ||||
} | } | ||||
unset($unguarded); | unset($unguarded); | ||||
} | } | ||||
public static function clearCache($key, $user_phid) { | public static function clearCache($key, $user_phid) { | ||||
Show All 40 Lines |