Skip to content

Commit b26c3da

Browse files
committed
Tidy up comments.
1 parent b9d67ac commit b26c3da

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/wp-includes/collaboration/class-wp-collaboration-table-storage.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,10 +346,8 @@ public function set_awareness_state( string $room, string $client_id, array $sta
346346
* awareness state. This allows implementations to increase or reduce the granularity
347347
* of awareness updates for the desired balance of real-time updates and server load.
348348
*
349-
* The default database granularity of 10 seconds limits the number of writes to the
350-
* database as WordPress only makes the database call if the transient has changed.
351-
* Increasing the granularity by lowering this number will increase the number of
352-
* database writes.
349+
* The default awareness granularity of 10 seconds limits the number of writes to the
350+
* database/object cache as the awareness state is only updated if the time has changed.
353351
*
354352
* @since 7.0.0
355353
*
@@ -369,12 +367,12 @@ public function set_awareness_state( string $room, string $client_id, array $sta
369367

370368
foreach ( $awareness as $index => $client_awareness ) {
371369
if ( $client_awareness['client_id'] === $client_id && $client_awareness['timestamp'] === $now_timestamp ) {
372-
// Cache already has the current client state, consider update a success (avoids cache thrashing).
370+
// Cache already has the current client expiry, consider update a success (avoids cache thrashing).
373371
return true;
374372
}
375373

376374
if ( $client_awareness['client_id'] === $client_id ) {
377-
// Remove stale cache entry for the current client, if it exists.
375+
// Remove stale cache entry for the current client.
378376
unset( $awareness[ $index ] );
379377
break;
380378
}

0 commit comments

Comments
 (0)