kind-kite-58745
06/27/2023, 11:46 AMagreeable-kitchen-44189
06/27/2023, 11:55 AM@task(cache=True, cache_version="1")
def foo(a: int) -> int:
...
And you first run it with a=1
, then with a=2
and then again with a=1
, the third iteration should get a cache hit. Is this what you’ve been thinking?
As for cache invalidation, in addition to the bucket lifecycle rules you have to set the max-cache-age
flytepropeller settingkind-kite-58745
06/27/2023, 12:04 PMBumping theBut now I see that I should in theory be able to keep the cache_version permanently at the same value and it will cache multiple sets of inputs. I am testing this now, will update here when I confirm it works. Thanks a lotis akin to invalidating the cache.cache_version
agreeable-kitchen-44189
06/27/2023, 12:08 PMmap_task
, there’s currently a known issue with regards to caching which should be fixed within the week.
Also, be careful with setting the cache version to a fixed value - as we all know together with naming, caching is one of the two hard things in computer sciencefreezing-airport-6809
kind-kite-58745
06/27/2023, 1:31 PM