 Loki = require('./loki.coffee')
 debug = require('../debug.coffee')
 events = require('../events.coffee')
+zotero_config = require('../zotero-config.coffee')
+
+version = require('../../gen/version.js')
 Translators = require('../../gen/translators.json')
 
 Prefs = require('../preferences.coffee')

})

DB.loadDatabase()

DB.remove = (ids) ->
  query = if Array.isArray(ids) then { itemID : { $in : ids } } else { itemID: ids }

    ttl
    ttlInterval
  })
  if (coll.getTransform(METADATA)?[0].value || {}).BetterBibTeX != version
    debug('CACHE: dropping cache', coll.name, 'because BetterBibTeX is now', version)
    coll.removeDataOnly()
  coll.setTransform(METADATA, [{
    type: METADATA,
    value : { BetterBibTeX: version }
  }])

# the preferences influence the output way too much, no keeping track of that
events.on('preference-changed', ->
