Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: cache validation #11

Open
klindsay28 opened this issue Sep 29, 2020 · 0 comments
Open

feature: cache validation #11

klindsay28 opened this issue Sep 29, 2020 · 0 comments

Comments

@klindsay28
Copy link

When I start up a new jupyter session, xpersist is assumes that cache files are correct.
This is not necessarily the case and it's kinda a hassle to work around this assumption.
It would be useful to attempt to validate cache file contents.

Based on advice of @dcherian, if token is computed as

token = dask.base.tokenize(self._func(*args, **kwargs))

the values are consistent across invocations and are computed relatively efficiently.

If this is done, then a potential approach for cache validation is to add this token to the object being cached, as an attribute. Then treat an existing cache file as correct if the token stored in the cache file matches the token for object.

Does this make sense?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant