def set_stringprep_cache_size(size):
<EOL>global _stringprep_cache_size<EOL>_stringprep_cache_size = size<EOL>if len(Profile.cache_items) > size:<EOL><INDENT>remove = Profile.cache_items[:-size]<EOL>for profile, key in remove:<EOL><INDENT>try:<EOL><INDENT>del profile.cache[key]<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>Profile.cache_items = Profile.cache_items[-size:]<EOL><DEDENT>
Modify stringprep cache size.

    :Parameters:
        - `size`: new cache size