Controls cache invalidation or persistance on errors#4945
Controls cache invalidation or persistance on errors#4945
Conversation
a635ec7 to
811c35b
Compare
811c35b to
81c5010
Compare
🤖 Augment PR SummarySummary: This PR refines integration caching behavior to better control whether cached entries are invalidated or retained when requests fail. Changes:
Technical Notes: Failed-promise caching behavior is now configurable via 🤖 Was this summary useful? React with 👍 or 👎 |
| }, | ||
| ); | ||
| void value.then(v => this.set(cache, key, v, etag, expiresAt, expireOnError)); | ||
| if (expireOnError !== false) { |
There was a problem hiding this comment.
When expireOnError === false, a rejected Promise remains cached, and since promise entries never get an expiresAt, this can effectively persist indefinitely and also overwrite any previously cached successful value. Consider whether call sites relying on this need a bounded retry/un-stick mechanism (e.g., explicit invalidation on credential change) so auth failures don’t become permanent.
Other Locations
src/plus/integrations/models/integration.ts:630
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
Description
Solves #4942
Controls cache invalidation or persistence on errors.
Be careful, because it makes #4943 more noticeable.
Checklist
Fixes $XXX -orCloses #XXX -prefix to auto-close the issue that your PR addresses