def configure(cache_name='cache', backend='sqlite', expire_after=None, allowable_codes=(200,), allowable_methods=('GET',), monkey_patch=True, **backend_options):
 try:
  global _cache
  _cache = backends.registry[backend](cache_name, **backend_options)
 except KeyError:
  raise ValueError(('Unsupported backend "%s" try one of: %s' % (backend, ', '.join(backends.registry.keys()))))
 if monkey_patch:
  redo_patch()
 _config['expire_after'] = expire_after
 _config['allowable_codes'] = allowable_codes
 _config['allowable_methods'] = allowable_methods

def configure ( cache_name = 'cache' , backend = 'sqlite' , expire_after = None , allowable_codes = ( 200 , ) , allowable_methods = ( 'GET' , ) , monkey_patch = True , ** backend_options ) : try : global _cache _cache = backends . registry [ backend ] ( cache_name , ** backend_options ) except KeyError : raise ValueError ( ( 'Unsupported backend "%s" try one of: %s' % ( backend , ', ' . join ( backends . registry . keys ( ) ) ) ) ) if monkey_patch : redo_patch ( ) _config [ 'expire_after' ] = expire_after _config [ 'allowable_codes' ] = allowable_codes _config [ 'allowable_methods' ] = allowable_methods
set up the python-musicbrainz-ngs module according to settings from the beets configuration .