code: def prepend_string_list(self, key, value, max_length_key):
          
          max_len = self.get(max_length_key)
          strings = self.get_string_list(key)
          strings = [value] + [x for x in strings if x != value]
          strings = strings[:max_len]
  
          self.beginWriteArray(key)
          for i in range(len(strings)):
              self.setArrayIndex(i)
              self.setValue("entry", strings[i])
          self.endArray()
docs: Prepend a fixed-length string list with a new string.
  
          The oldest string will be removed from the list. If the string is
          already in the list, it is shuffled to the top. Use this to implement
          things like a 'most recent files' entry.