#NEWLINE# def get_memcached_hosts( ) : #NEWLINE# #INDENT# 'Return the hosts currently configured for memcached.' #NEWLINE# if ( not memcache ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# cache_info = settings . CACHES [ DEFAULT_FORWARD_CACHE_ALIAS ] #NEWLINE# backend = cache_info [ 'BACKEND' ] #NEWLINE# locations = cache_info . get ( 'LOCATION' , [ ] ) #NEWLINE# if ( ( not backend . startswith ( 'django.core.cache.backends.memcached' ) ) or ( not locations ) ) : #NEWLINE# #INDENT# return [ ] #NEWLINE# #UNINDENT# if ( not isinstance ( locations , list ) ) : #NEWLINE# #INDENT# locations = [ locations ] #NEWLINE# #UNINDENT# return locations