INNER CODE UNIT · JavaScript

clearMemoryCache

furey/mongodb-lens · mongodb-lens.js:116

const clearMemoryCache = () => {
  for (const cacheType of config.enabledCaches) {
    if (memoryCache[cacheType]) {
      log(`Clearing ${cacheType} cache`)
      memoryCache[cacheType].clear()
    }
  }
}

const connect = async (uri = 'mongodb://localhost:27017', validate = true) => {
  try {
    log(`Connecting to MongoDB at: ${obfuscateMongoUri(uri)}`)

    const connectionOptions = { ...config.connectionOptions }

    mongoClient = new MongoClient(uri, connectionOptions)

    let retryCount = 0

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…