A quick question. I have a task with cache enabled...
# flytekit
h
A quick question. I have a task with cache enabled, is there a way to disable cache when running under pytest (it’s effectively a local execution)?
OK I can do the following:
Copy code
log_data.metadata.cache = False
    result = log_data(data="foo", storage_object_name="fizz", output_uri="<gs://buzz>")
It works but seems hacky.
j
yeah we have this fixture
Copy code
@pytest.fixture(autouse=True)
def clear_local_cache() -> None:
    LocalTaskCache.clear()
this should clear your local cahce
h
That looks better! Thank you.
153 Views