#NEWLINE# def __init__( self , table , params ) : #NEWLINE# #INDENT# super ( MySQLCache , self ) . __init__ ( table , params ) #NEWLINE# options = params . get ( 'OPTIONS' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# self . _compress_min_length = options . get ( 'COMPRESS_MIN_LENGTH' , 5000 ) #NEWLINE# self . _compress_level = options . get ( 'COMPRESS_LEVEL' , 6 ) #NEWLINE# self . _cull_probability = options . get ( 'CULL_PROBABILITY' , 0.01 ) #NEWLINE# if ( self . key_func is default_key_func ) : #NEWLINE# #INDENT# self . reverse_key_func = default_reverse_key_func #NEWLINE# if ( ':' in self . key_prefix ) : #NEWLINE# #INDENT# raise ValueError ( 'Cannot use the default KEY_FUNCTION and REVERSE_KEY_FUNCTION if you have a colon in your KEY_PREFIX.' ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# reverse_key_func = params . get ( 'REVERSE_KEY_FUNCTION' , None ) #NEWLINE# self . reverse_key_func = get_reverse_key_func ( options )