def autodetect():
 try:
  from google.appengine.api import memcache
  from . import appengine_memcache
  return appengine_memcache.cache
 except Exception:
  try:
   from . import file_cache
   return file_cache.cache
  except Exception as e:
   LOGGER.warning(e, exc_info=True)
   return None

def autodetect ( ) : try : from google . appengine . api import memcache from . import appengine_memcache return appengine_memcache . cache except Exception : try : from . import file_cache return file_cache . cache except Exception as e : LOGGER . warning ( e , exc_info = True ) return None
detects an appropriate cache module and returns it .