#NEWLINE# def incr_version( self , key , delta = 1 , version = None ) : #NEWLINE# #INDENT# 'Adds delta to the cache version for the supplied key. Returns the\n        new version.\n        ' #NEWLINE# if ( version is None ) : #NEWLINE# #INDENT# version = self . version #NEWLINE# #UNINDENT# value = self . get ( key , version = version ) #NEWLINE# if ( value is None ) : #NEWLINE# #INDENT# raise ValueError ( ( "Key '%s' not found" % key ) ) #NEWLINE# #UNINDENT# self . set ( key , value , version = ( version + delta ) ) #NEWLINE# self . delete ( key , version = version ) #NEWLINE# return ( version + delta )