old_contents: #!/usr/bin/env python
  # -*- coding: utf-8 -*-
  """
      requests_cache.backends
      ~~~~~~~~~~~~~~~~~~~~~~~
  
      Classes and functions for cache persistence
  """
  
  from .sqlite import DbCache
  from .base import BaseCache
  
  registry = {
      'sqlite': DbCache,
      'memory': BaseCache,
  }
  try:
      from .mongo import MongoCache
      registry['mongo'] = registry['mongodb'] = MongoCache
  except ImportError:
      MongoCache = None
  
new_contents: #!/usr/bin/env python
  # -*- coding: utf-8 -*-
  """
      requests_cache.backends
      ~~~~~~~~~~~~~~~~~~~~~~~
  
      Classes and functions for cache persistence
  """
  
  
  from .base import BaseCache
  
  registry = {
      'memory': BaseCache,
  }
  
  try:
      # Heroku doesn't allow the SQLite3 module to be installed
      from .sqlite import DbCache
      registry['sqlite'] = DbCache
  except ImportError:
      DbCache = None
  
  try:
      from .mongo import MongoCache
      registry['mongo'] = registry['mongodb'] = MongoCache
  except ImportError:
      MongoCache = None
  
subject: Make sqlite3 optional for Heroku support. Thanks to @nathancahill