#NEWLINE# def get_cache( self , namespace , query_hash , length , start , end ) : #NEWLINE# #INDENT# 'Get a cached value for the specified date range and query' #NEWLINE# cursor = self . cursor #NEWLINE# cursor . execute ( 'SELECT start, value FROM gauged_cache WHERE namespace = %s AND hash = %s AND length = %s AND start BETWEEN %s AND %s' , ( namespace , query_hash , length , start , query_hash ) ) #NEWLINE# return cursor . fetchall ( )