def set_stringprep_cache_size(size):
    # pylint: disable-msg=W0603
    global _stringprep_cache_size
    _stringprep_cache_size = size
    if len(Profile.cache_items) > size:
        remove = Profile.cache_items[:-size]
        for profile, key in remove:
            try:
                del profile.cache[key]
            except KeyError:
                pass
        Profile.cache_items = Profile.cache_items[-size:]

# vi: sts=4 et sw=4
See ``test_app_state_always_and_config_always_restarted``
dataset/ETHPy150Open kuri65536/python-for-android/python3-alpha/python-libs/pyxmpp2/xmppstringprep.py/set_stringprep_cache_size--crossover with--dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/test/test_container.py/ApplicationNodeDeployerCalculateChangesTests.test_app_state_never_and_config_always_not_restarted