def _get_info_from_memcache(app, env, account, container=None):
 cache_key = get_cache_key(account, container)
 memcache = (getattr(app, 'memcache', None) or env.get('swift.cache'))
 if memcache:
  info = memcache.get(cache_key)
  if info:
   for key in info:
    if isinstance(info[key], six.text_type):
     info[key] = info[key].encode('utf-8')
    elif isinstance(info[key], dict):
     for (subkey, value) in info[key].items():
      if isinstance(value, six.text_type):
       info[key][subkey] = value.encode('utf-8')
   env.setdefault('swift.infocache', {})[cache_key] = info
  return info
 return None

def _get_info_from_memcache ( app , env , account , container = None ) : cache_key = get_cache_key ( account , container ) memcache = ( getattr ( app , 'memcache' , None ) or env . get ( 'swift.cache' ) ) if memcache : info = memcache . get ( cache_key ) if info : for key in info : if isinstance ( info [ key ] , six . text_type ) : info [ key ] = info [ key ] . encode ( 'utf-8' ) elif isinstance ( info [ key ] , dict ) : for ( subkey , value ) in info [ key ] . items ( ) : if isinstance ( value , six . text_type ) : info [ key ] [ subkey ] = value . encode ( 'utf-8' ) env . setdefault ( 'swift.infocache' , { } ) [ cache_key ] = info return info return None
get cached account or container information from memcache .