docs: def convert_identifier_to_key(identifier):
          """ Takes an identifier (like a username or IP address) and converts it
              into a key usable by the cache system.
          """
          key = ''.join(c for c in identifier if c.isalnum() or c in '_.-')
          if len(key) > 230:
              key = key[:150] + '-' + hashlib.md5(key).hexdigest()
  
          return "%s_accesses" % key