refactored internal documentation and simplified comments across chat BLoCs, file viewer, and navigation components
This commit is contained in:
@@ -36,15 +36,12 @@ class _AvatarCacheEntry {
|
||||
_AvatarCacheEntry(this.payload, this.fetchedAt);
|
||||
}
|
||||
|
||||
// Cap keeps the heap bounded for power-users in Talk; TTL ensures
|
||||
// server-side avatar updates become visible within a session without
|
||||
// requiring an app restart. LinkedHashMap insertion-order plus a remove
|
||||
// on hit gives us LRU eviction.
|
||||
// LRU via LinkedHashMap insertion order + remove-on-hit. TTL so
|
||||
// server-side avatar updates become visible within a session.
|
||||
const int _kAvatarCacheMax = 256;
|
||||
const Duration _kAvatarCacheTtl = Duration(minutes: 30);
|
||||
|
||||
// Resolved payloads are cached so re-mounts render synchronously; in-flight
|
||||
// requests are deduped so concurrent mounts share one HTTP call.
|
||||
// Pending map dedups concurrent mounts onto a single HTTP call.
|
||||
final LinkedHashMap<String, _AvatarCacheEntry> _resolvedAvatars =
|
||||
LinkedHashMap<String, _AvatarCacheEntry>();
|
||||
final Map<String, Future<_AvatarPayload?>> _pendingAvatars = {};
|
||||
|
||||
Reference in New Issue
Block a user