getsentry / getsentry/sentry-react-native
Add option maxCacheSize
- Vorherrschende Sprache
- TypeScript
- Sterne
- 1.8k
- Forks
- 366
- Ø Merge
- 1 T. 6 Std.
- Gemergte PRs (30 T.)
- 94
Beschreibung
### Description
See https://github.com/getsentry/team-mobile/issues/163.
SDKs with offline caching have the option maxCacheItems to specify the maximum number of envelopes to keep in the offline cache. Envelopes can significantly vary in size depending on which features our customers use. They can range from a couple of KBs up to MBs if, for example, screenshots are enabled.
As a mobile engineer, you mostly care about how much space the offline cache of Sentry SDKs will use on your user's devices. Therefore, we could add an option called maxCacheSize specifying the maximum size of bytes the offline cache can use until it has to delete envelopes. maxCacheSize and maxCacheItems should work together. Whenever the SDK stores an envelope to disk, it has to check if either maxCacheSize or maxCacheItems is reached, and if so, delete the oldest envelope.
What the default value for maxCacheSize should be is still being discussed.
Beitragsleitfaden
Rechercherichtung
Beginne mit dem Lesen der Implementierung von offline-cache und des verlinkten team-mobile-Issues zum noch ungeklärten Standardwert. Überprüfe, wie Envelopes gespeichert und entfernt werden, und definiere den Abschluss anhand der Durchsetzung von sowohl maxCacheSize als auch maxCacheItems, indem das älteste Envelope gelöscht wird, sobald eines der beiden Limits erreicht ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- react-native, typescript
- Bereich
- mobile
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100