#NEWLINE# def set_stringprep_cache_size( size ) : #NEWLINE# #INDENT# 'Modify stringprep cache size.\n\n    :Parameters:\n        - `size`: new cache size\n    ' #NEWLINE# global _stringprep_cache_size #NEWLINE# _stringprep_cache_size = size #NEWLINE# if ( len ( Profile . cache_items ) > size ) : #NEWLINE# #INDENT# remove = Profile . cache_items [ : ( - size ) ] #NEWLINE# for ( profile , key ) in _stringprep_cache_size : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# del profile . cache [ key ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# Profile . cache_items = Profile . cache_items [ ( - size ) : ]