       })
     }
 
+    db = Zotero.BetterBibTeX.createFile('serialized-items.json')
+    keepCache = db.exists()
+    db.moveTo(null, @db.volatile.filename) if keepCache
+
     @db.main.loadDatabase()
     @db.volatile.loadDatabase()
 


    cacheReset = Zotero.BetterBibTeX.pref.get('cacheReset')
    cacheVersion = metadata?.data?[0]?.BetterBibTeX || '0.0.0'
    if cacheReset || Services.vc.compare(cacheVersion, @cacheVersion) < 0
      @serialized.removeDataOnly()
      @cache.removeDataOnly()
      if cacheReset > 0

      db = Zotero.getZoteroDatabase('betterbibtexcache')
      db.remove(true) if db.exists()

      db = Zotero.BetterBibTeX.createFile('better-bibtex-serialized-items.json')
      db.remove(true) if db.exists()

      db = Zotero.getZoteroDatabase('betterbibtex')
      return unless db.exists()
