Use loader.clear(key) to remove a specific key from the cache after a mutation, or loader.prime(key, value) to replace the cached value with the updated object. Call clearAll() to flush the entire request-scoped cache. Set cache: false for operations where freshness is always critical.
loader.clear(key) — removes a single cached key; next load() for that key will re-batch.
loader.clearAll() — flushes the entire request-scoped cache.
loader.prime(key, value) — pre-populates the cache with a known value to avoid re-fetching.
prime() is more efficient than clear() after a write — you already have the updated value.
cache: false — disables caching entirely; every load() call is included in the next batch.