def merge_cache_under_settings(destination, setting, key_prefix, list_=False):
 default = ({} if (not list_) else [])
 existing = destination.settings.get(setting)
 value = get_cache(((key_prefix + '.') + setting), default)
 if value:
  if existing:
   if list_:
    base = dict(zip(value, ([None] * len(value))))
    for val in existing:
     if (val in base):
      continue
     value.append(val)
   else:
    value.update(existing)
  destination.settings[setting] = value

def merge_cache_under_settings ( destination , setting , key_prefix , list_ = False ) : default = ( { } if ( not list_ ) else [ ] ) existing = destination . settings . get ( setting ) value = get_cache ( ( ( key_prefix + '.' ) + setting ) , default ) if value : if existing : if list_ : base = dict ( zip ( value , ( [ None ] * len ( value ) ) ) ) for val in existing : if ( val in base ) : continue value . append ( val ) else : value . update ( existing ) destination . settings [ setting ] = value
take the cached value of key and put it into the key setting of the destination .