Bug 1581909 - Clear in-memory item cache before re-filling it; r=pmorris
☠☠ backed out by 2148bb88117e ☠ ☠
authorGeoff Lankow <geoff@darktrojan.net>
Thu, 19 Sep 2019 20:40:56 +1200
changeset 36860 2fd4b75c695082f82642c58d06948f11784d552d
parent 36859 d52c5f0981525fe1b66bc0f450ce4d667fb22b15
child 36861 23362b85a4faf30a1fcebddf9a220a52ac69ab84
push id395
push userclokep@gmail.com
push dateMon, 02 Dec 2019 19:38:57 +0000
reviewerspmorris
bugs1581909
Bug 1581909 - Clear in-memory item cache before re-filling it; r=pmorris
calendar/providers/storage/calStorageCalendar.js
--- a/calendar/providers/storage/calStorageCalendar.js
+++ b/calendar/providers/storage/calStorageCalendar.js
@@ -1647,16 +1647,18 @@ calStorageCalendar.prototype = {
       this.mRecItemCachePromise = this._assureRecurringItemCaches();
     }
     return this.mRecItemCachePromise;
   },
   _assureRecurringItemCaches: async function() {
     // build up recurring event and todo cache with its offline flags,
     // because we need that on every query: for recurring items, we need to
     // query database-wide.. yuck
+    this.mItemCache.clear();
+
     let events = [];
     let itemsMap = new Map();
     this.prepareStatement(this.mSelectEventsWithRecurrence);
     await this.executeAsync(this.mSelectEventsWithRecurrence, async row => {
       events.push(row);
     });
     for (let row of events) {
       let item = await this.getEventFromRow(row, false);