@contextlib.contextmanager
def skip_cache():
 old = getattr(_locals, 'skip_cache', False)
 _locals.skip_cache = True
 try:
  (yield)
 finally:
  _locals.skip_cache = old

@ contextlib . contextmanager def skip_cache ( ) : old = getattr ( _locals , 'skip_cache' , False ) _locals . skip_cache = True try : ( yield ) finally : _locals . skip_cache = old
within this context .