#NEWLINE# @ test_speed #NEWLINE# def get_records( cur ) : #NEWLINE# #INDENT# cached = mclient . get ( CACHE_KEY ) #NEWLINE# if cached : #NEWLINE# #INDENT# print_success ( 'Found the cached version instead' ) #NEWLINE# return cached #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# print_warning ( 'Looking up SQL Records' ) #NEWLINE# cur . execute ( 'SELECT * FROM cache_table;' ) #NEWLINE# records = cur . fetchall ( ) #NEWLINE# conn . commit ( ) #NEWLINE# mclient . set ( CACHE_KEY , records ) #NEWLINE# return records