Why this matters
Improves lookup performance from O(n) to O(1) average.
For frequent key lookups, use Dictionary/ConcurrentDictionary instead of repeated linear scans.
Improves lookup performance from O(n) to O(1) average.
Side-by-side examples engineers can pattern-match during review.
var user = users.FirstOrDefault(u => u.Id == id);if (userMap.TryGetValue(id, out var user)) { /* ... */ }list.First(x=>x.Id==id)dict.TryGetValue(id, out var v)From the same buckets as this rule.
All static JS/CSS/font/image files MUST use content-hashed filenames (e.g., app.9c1a7b.js) and be served with "Cache-Control: public, max-age=31536000, immutable". HTML and other non-fingerprinted documents MUST be served with "Cache-Control: no-cache" (or equivalent) to enable conditional revalidation.