def drop_caches():
 utils.run('sync', verbose=False)
 utils.run('echo 3 > /proc/sys/vm/drop_caches', ignore_status=True, verbose=False)

def drop_caches ( ) : utils . run ( 'sync' , verbose = False ) utils . run ( 'echo 3 > /proc/sys/vm/drop_caches' , ignore_status = True , verbose = False )
writes back all dirty pages to disk and clears all the caches .